This phrase has become one of the more common utterances in our language in recent years, and it's objectively dumb.
as·sign
/əˈsīn/
verb
allocate (a job or duty).
"his leader assigned him this mission"designate or set (something) aside for a specific purpose.
"managers happily assign large sums of money to travel budgets"
The first problem is the implication that the doctor looked at my penis and actually assigned me to do something because of it. No, the doctor saw my penis and observed that I'm male, and wrote it down. If anybody assigned me to do anything at birth, it was God, and it happened before that.
That's the other thing, we all know that we all are capable of knowing the sex of a child well before birth.
My parents knew that I was a boy months before I was born, and they knew that my sister was a girl months before she was born. More commonly than not, the sex of a child is known well before birth.
Notice again that I said "known" rather than "determined". That's because I'm not a moron or a gender theorist (those terms are interchangeable) who thinks that biological sex is something that simply exists in culture, and it's the determination of some doctor whether you're male or female, and that's something that we can simply get rid of. No, doctors simply observe what you are in regard to sex, and record it.
This is actually Orwellian language. It's stupid on its face. It's false, and everybody who knows the meaning of the words knows that it's false, but everybody is saying it anyway.