Like every other government service - highways, defense, etc. They’re profitable to the system, but not per se.
See: American Letter Mail Company.
"In 2006, Congress passed the Postal Accountability and Enhancement Act (PAEA). This law forced the USPS to do something virtually no other government agency or private corporation has to do: prefund its retiree healthcare benefits 75 years into the future[0]. Essentially, they were legally required to fast-track billions of dollars into a fund to pay for the future retirement health benefits of current employees, and theoretically even future employees who hadn't been hired yet."