It's not necessary to run Prime for 8 hours if we are not talking about overclocked cpu & memory. Testing with other games and short run in Prime is enough for stability test.
It's only necessary if you want a stable computer. Some people go nuts and say 24 hours of Prime95. I've read a lot and the consensus is that most do 8-10 hours. It doesn't matter if your CPU is overclocked or not, it can still be faulty out of the box. Memory faults can develop (although rare) and components need time to warm up (not 8 hours but testing after components have reached their maximum temp is needed). Prime95 will quickly bring out voltage issues, overheating issues, CPU issues, Memory issues, and chipset issues. It's a great program to start with.
I've personally had computers that are stable for 4 hours of Memtest but 5-6 hours they would lock up. This means they're not stable. It's not a simple "oh, it works for 5 minutes, it must be fine" scenario.