"Yoshi has the best shield in the game" - Non Yoshi mains.
This gamebreaking glitch is not yet fully understood but the general problem has been identified as a brawl quirk with invincibility. In Melee, if you are hit by a hitbox when you are invincible, you "deactivate" the hitbox, and cannot be hit by it again. However, in Brawl (and by extension Project M) if you are hit by a hitbox while invincible and lose invincibility while that hitbox is still active, you will get hit.
Yoshi has a much different shield than the rest of the cast. Unlike the regular bubble shield, Yoshi has an egg that encases his entire body (which also means he cannot be shield poked) however, Yoshi also has a 6 second shielding animation during which he is invincible. This shielding animation is the secret to parrying in Melee... and the secret to parry glitch in PM. For some reason, when Yoshi is hit during his shielding animation by certain moves, he loses his invincibility and either goes into shield, or sometimes just gets hit by the move, as seen by the Gfycat in the OP. This glitch also affects powershielding normal attacks and projectiles.
This behavior is NOT intentional and has existed since Yoshi's release in 3.0. PMDT has yet to fix this glitch, though I believe it is because they are too focused on fixing the invincibility issue to reinstate parrying when they can attack this particular problem directly. Personally, I think the 6 frame shielding animation should be removed entirely (which would also remove grab parrying) and if that is too much of a buff, I would be satisfied with downgrading Yoshi's shield to a regular bubble shield. As it stands now this glitch has caused me too much frustration and decided too many games.
Note: I am not attempting to "parry" in the gfycat above. I'm simply shielding and holding shield. Where other characters may have powershielded the Lucario nair, Yoshi died for it.