That is called a published Departure Procedure that they filed out of KSAN. If you look at the aircraft filed flight plan, you will see “PADRZ2 MALIT …” which stands for the PADRZ TWO DEPARTURE with a MALIT transition. Published departures from large airports help control the traffic departing and minimize the required radio comm between the aircraft and the controller. Once the crew checks in with departure, the controller knows exactly where the aircraft is going (including altitude restrictions). They still keep an eye on it to verify the correct procedure is being flown, but do not have to tell them every time to turn or change altitudes.
Here are a couple good links you will probably enjoy.
This is a skyvector.com link to the first part of the flight plan to MALIT, then direct to PHNL. It will open on a world hi aviation chart, but you can change the chart type in the top right if you like.
Here is a link to the KSAN with the Standard Terminal Arrival (STAR), Instrument Approach Procedure, and Departure Procedures:
Here is a direct link to the PADRZ TWO DEPARTURE:
Flying a published departure also helps with flow control and keeps aircraft spaced that are entering the route to PHNL. When flying a published departure and traffic allows, it is fairly common to start on the departure and then be cleared direct to a point further along your filed flight plan. That saves time and fuel when allowed.
If you look at the chart, you will also see there is Warning airspace west of KSAN. If the airspace was active with military traffic, that could also explain why the aircraft ended up flying the full departure procedure around the airspace.
One tip. If you like, you can also change the FA displayed chart to be an aviation chart. Use “Change map layers” icon in the top right corner of the chart and you can use “click to change” to select other available charts.
Have fun with Skyvector and the other FA charts.