they cannot be free, either way someone must pay for them.

Yes, you are right. But concept of social solidarity in education, healthcare etc is not something unique to Communism. In fact, it exist in Nordic countries, UK  (well no education at least not hiqh quality one), Austria, Deutschland etc.

I think Yugoslav ecconomy did not crash because of social care. I think it has mor to do with savage corruption, which was unfortunatley continued today. Tito could count International loans so far as he could stick finger in eye to Soviets.  But with changed climate, political ecconomic etc, there was less and less oportunity to take now loan which would provide money for wages, pensions, and of course for new flats, cars and villas for leaders of self-governing workers :D