Assignment at birth is based on genitalia/sex. Sometimes doctors fuck that up too, intersex or no. I personally don't see a point in it either.
It's reductive to think there's a correct gender at birth or that it could be reliably assigned as it often has little to do with what's in your pants. E.g. you're probably not experiencing gender dysphoria in the first couple years of life, because babies are treated pretty much the same regardless.
It's just part and parcel with caustic masculinity. If you don't want to be competitive and treat other human beings like meatbags then you're uncomfortable and weird.