Or perhaps your 4-year-old is now more comfortable with water and physical activity (motor - neuron skills) and ready to learn to swim now?
Honestly I think the biggest difference is that its an indoor facility with 92 degree water. My son has zero body fat and was shivering like crazy during and after every lesson. It's hard to pay attention if you are miserable. Part of the extra expense is just for hot water.
There is also 3-1 student teacher ratio vs. 6-1 at the Y.
However, as someone who learned to swim at the age of 35 I'm well aware of what quality swim instruction looks like. There's a big difference between someone who actually knows how to teach and is using good methodology (balance in the water, no reliance on flotation devices) vs. a 19 year-old home from college for the summer who may or may not have any special training or aptitude for instruction.