Speculative, but I think "My bad" came from basketball. It's a quick way to express contrition without having to take one's attention away from the ongoing game.
When I first saw "My bad", I thought it was a typo and was supposed to be "Me bad", which I assumed was a slang expression of mock shame meaning "I'm bad because I made a mistake". Of course, in the world of slang, "bad" often means "good".
I believe wordnerd is correct. That's where I first heard it, anyway.
When a whistle is blown on a foul and the person committing the foul realizes it, he or she may raise a hand to the crowd (especially if the foul was totally unintentional) as if to say, "OK, that was me, I'm sorry. I didn't intentionally try to throw my elbow into your throat." On the court, this became shortened to "my bad," a handy expression I've picked up but will now try to put down again seeing as how it seems to grate on everyone's ear.
CJ, my understanding of the phrase's basketball use is that it is typically used when the cooperation between two teammates has "gang agley".
For example, suppose you throw me a pass that's not easy to catch, and I miss it. In lieu of faulting my stone hands you might, in the spirit of team harmony, take the blame upon yourself by saying "My bad"; that is, saying that the fault lay with your pass rather than my fumbling.
quote:When a whistle is blown on a foul and the person committing the foul realizes it, he or she may raise a hand to the crowd as if to say, "OK, that was me, I'm sorry."
The player raises a hand for a different reason: to make it easier for the scorekeeper to identify the person against whom the foul is to be charged. I used to coach basketball for kids about 13 years old, and they were taught to do that; I don't recall if it's required by the official rules.
And by the way, thanks for bringing back some very sweet memories.