Just from reading different threads about taunting and when people taunt, I think the meaning behind taunts is commonly understood. It's just like body language.
So when user Untamed said "You can't assume your opponent will think you're taunting for the same reason," I don't think that's true to a large extent.
For example, I think practically everyone will agree that taunting in the beginning of the first match is like saying "hello."
Taunting after both players die at the same time is usually something like "LOL" or "doh!"
Taunting after a KO is an actual "taunt" (showing off, being provocative).
Taunting after you get KO'ed by the other player is commending the opponent (maybe they did something really awesome).
So, to address holymario's original issue, my best guess is there are two reasons you're getting attacked during a friendly taunt:
1) You're playing against a child who simply doesn't understand what you're doing.
2) You're playing against someone who doesn't care about what you have to say, and just wants to win.
It makes me slightly sad when someone doesn't understand or care for my friendly attitude when playing, but I can't fault them for having a different thought process than me.