No sex, anyone else been told no?

Alicia

A couple weeks ago, my fiancé and I had sex and the next day I was discharging brown and a very very light pink. I called my doctor and she said that it was just irritation because we haven’t had sex regularly. I saw her today and now she says no sex until after our next ultrasound which is in another 2 weeks and we find out the gender that appointment. All she said was she wanted to see the location of the placenta before she gave us the green light. Did anyone else have this? Just curious why she advised that.