CPP was supposed to be a government-managed savings plan, just like EI was supposed to be a government-managed insurance plan. The money paid into them was supposed to be kept separate from general government revenues, and they weren't supposed to be social programs. (OAS and welfare were supposed to be the corresponding social programs)
CPP funds are still kept separate, governed by the CPP Investment Board, a crown corp. EI dues are paid into general government revenues. Both programs have taken on elements of social programs; CPP disability pays people below retirement age and their children and EI tops up the benefits of low wage earners.
It's pretty normal for institutional programs to veer away from their original raison d'etre, as these have done. Expanding existing, popular programs is a politically expedient way to address social problems. Right wing think tanks have a fit and predict doom, but most Canadians are ok with our government's mandate to make sure everyone is taken care of to some degree.
Replication of services and overly complicated programs are some of the reasons that people like the idea of a universal basic income; instead of having welfare, EI, OAS, CPP, and the other programs that create income security for Canadians there could be a single program that provides a modest income to everyone. The issue is more complicated than this, but one factor is that redundant bureaucracies could be eliminated.
Anyways, I just like having the chance to blather on about the stuff I studied in grad school. Carry on.