It can be emotionally hard to cut into your own kid or to witness them go into a critical situation.
AFAIK, there's no actual limitation that prevents this, but just a general understanding that someone non-related to the patient would be able to handle the stress of surgery better.
> A father and son were in a car accident where the father was killed. The ambulance brought the son to the hospital. He needed immediate surgery. In the operating room, a doctor came in and looked at the little boy and said I can't operate on him he is my son. Who is the doctor?
The riddle is literally just a play on "women can't be surgeons."