This boils down to job creation. Once the Spaniards pulled out of their colonies, those privileged civil servant’s had to have a job in a shrinking empire, economy. This continued during Franco period for political reasons. Its now part of its culture and it for this reason every Spaniard wants to be a civil servant.
Also, note it is also getting like this in UK and that is why perhaps we have low employment as millions are pushing paper and hampering the growth of people trying to create wealth