I would guess money mostly. One or two tests every year, very big London ground (which I think sells out for T20/sloggit), plus whatever they make from corporate work.
Very big membership (15-18k, I think).
It's really only kicked in from about 10 years ago, I expect there was a financial change that drove Surrey forward (T20 becoming the T20 Blast was 10 years ago, I don't know what it was like before that!).
Unlike the likes of Lancashire, I think Surrey have a guaranteed home test every year for a long time, which allows proper planning (Lancashire dropped out of bidding for Ashes tests as the numbers were too high).
The Hundred adds to it, as there are only 8 sides, and some are sort-of cross-county things. It was thought at the outset that it would cement the test counties at the top.
In the same way that counties with test grounds are ahead of non-test counties, Surrey are usually ahead of others.