Problems on Start up

Ive been looking at a friends computer this afternoon who after installing CCleaner found that the after entering password it would take about 5 minutes for the computer to start up and display the desktop.

Eventually I told the CCleaner program to run on start up and now it boots up fine.

I was wondering if anyone knows why this would be the case as normally a program will slow a computer down if it runs on start up not the other way round.

it might due to windows update doing something in the background

when you do the next restart, its already finished

or prefetch folder being cleaned