Not all of them. We have plenty of SES in Homeland Security who are not political appointees.
https://en.wikipedia.org/wiki/Senior_Executive_Service_(United_States)
I was told a long time ago by those that supposedly know that in theory they serve at the pleasure of the President.
The respective agencies nominate them and send the list to Congress for concurrence. Protocol-wise similar to military Flag rank officers that’s why when you see official pictures of them there a flag in the background.