Others have already mentioned this, but OP seems to completely miss the fact that USPS is obligated to perform its affordable, uniform-rate deliveries to rural areas.
https://www.ips-dc.org/the-public-postal-service-and-rural-america/
Rural areas account for 88 percent of the geographic area served by the Postal Service, but just 16 percent of the U.S. population.
Some 57 percent of post offices are in rural areas and while they serve a vital purpose, nearly two-thirds of them have not been profitable in recent years.
Given that most of the population lives in cities, it makes sense that competing operations would form to provide services that can be cheaper, faster, and capable of shipping packages that are extra heavy, large dimensions, or require refrigeration. Specifically because these private shippers rely on USPS for last mile delivery or do not service rural areas at all, they are able to operate with much better margins. These companies grow into megacorps because, as OP mentioned, economies of scale. If someone needs to specialty ship something they are going to prefer to use a well-known business with a proven track record that services the widest area. Once a company is servicing an area, it becomes more efficient and therefore profitable to increase deliveries within that area, creating extra incentives for a shipper to grow.
I'm not here to say that USPS is flawless, but it is inherently at a disadvantage for urban delivery due to the losses it incurs to fulfill its obligation to service the country as a whole.
This is getting long-winded for a showerthoughts response, so I'm just going to link information regarding the additional obstacles USPS faces:
https://govtschemes.org/usps-operational-restructuring-plan-update/
(I realized after reading that govfacts.org are AI generated articles, but there is good information, so I am still including it)