Pensions make a lot of sense mathematically. If I personally fund my retirement I have to save enough for the "worst" case scenario of living many years longer than average. A pension on the other hand only has to invest enough for the average lifespan because the person who dies a week before retirement and collects nothing helps fund the person who lives to be 105.
State pensions are in trouble because govt pensions are allowed to assume overly optimistic rates of return.