They are in the commercial space launch business. They deliver satellites and other payloads to orbit and the ISS.
People pay them to put things into space
Should be their moto.
out: "SPACEX DESIGNS, MANUFACTURES AND LAUNCHES ADVANCED ROCKETS AND SPACECRAFT"
in: "SpaceX: We put things in space so you won't have to"
A lot of their initial revenue came from Air Force and other military contracts to launch satellites to space. GPS satellites, spy satellites etc.
E.g here's an article from 2016 about them launching a GPS satellite for ~$90M: https://www.reuters.com/article/us-space-spacex-launch-ula-i...
More recently they also launch private satellites. Iirc, Facebook has plans to launch their next satellites on a SpaceX rocket (an earlier attempt failed).