I think this is mainly an American expression. Why when someone realises they have made a mistake or an error in something, and in acknowledgement of that mistake will say something like "Sorry, that was me, my bad" Why do people say 'My Bad', and where did the expression come from???
I seem to recall reading somewhere that it originated in basketball, though I couldn't say why. It just means 'my mistake' and, yes, is definitely American.