This phrase actually came from bad spelling and the internet. Lazy spellers who couldn't be bothered with an apostrophe said:
"your bad" instead of "you're bad", the latter being correct (a contraction for YOU ARE BAD), but the former being more common.
The proper response to "your bad" is OH, it's MY BAD? The "bad" being possessive.
I ditched school today. My bad." from the original "oh, you ditched today? Your bad.