Because much of sport is about celebrating outstanding sporting achievement.
Sport is separated by several discrimatory segments to allow the outstanding performers to be found for each category, and for safety too. For instance, age is a discriminatory category. We don’t have adults competing against children. We also don’t have younger people competing in the over 50 categories. That would be unfair. And dangerous.
Some Disabilities require their own category too. To be able to celebrate their achievements in a fair and safe competition.
Sex is just another discriminatory category. Males have many advantages compared to females. This is not just physical of course. But it is also systemic. Better training over their lifetime, not having to deal with menstruation, pregnancy, better pay and sponsorship, better support from the community.
But of course, the physical benefits are quite clear. Have a look at the boysvswomen.com site linked up thread. Teenage boys beat female world records consistently. And those benefits have been proven, studies linked also up thread, to be not reduced by lowering testosterone after male puberty.
For some better insight, I might suggest you could look up the world rugby decision about female world rugby. Some great stats there.
If you are on twitter, why not look up Ross Tucker (a sports scientist). He has also some excellent information and seems happy to answer questions. He would do a much better job than I can in explaining it.