The interesting question is why other sorts of resort towns aren't liberal like ski resorts. Like, most beach towns vote quite Republican and even inland resort towns like Gatlinburg/Pigeon Forge, Tennessee and Branson, Missouri.
Skiing is attracts cosmopolitan, educated, high-income people as participants. Ski-resort employees are typically similar.
Other resorts are more culturally accessible. Gambling, amusement parks, and country music are low end, and anyone can go to the beach.
Also the beach towns that attract a similar crowd vote the same way. Thinking of Martha’s Vineyard and the rest of the Cape.
Fair enough on the Vineyard, though I expect this may be changing among the year-rounders and the population is small enough to be unpredictable.
But the Cape as a whole is more Republican than the rest of Massachusetts and pretty much always has been. Provincetown is an exception for obvious reasons but is only one town. The Cape is essentially the outer Long Island of Massachusetts, politically, and Provincetown is Fire Island.