Got back on my period?

So, to preface, I have really weird periods because I used the birth control implant. So, they’re like 3 months apparat, but like two weeks long, but not always because. They’re not consistent.

Anyways, my husband and I don’t have sex on my period, and I thought it was over. I hadn’t bled all day, just normal clear discharge. However, after sex I peed and blood came out of my vagina and there was blood all over his penis too. How did that happen? Did having sex make my period start again? Was it not over? Is it like “left over” blood that was pushed out by my uterus during orgasm? I was so grossed out. anyone know what’s up?