It is hard for us to diagnose the issues you had with the old computer. The startup issues could just have been a corrupt directory issue which could have been easily repaired with running Disk Utility from your system installer disc.
Motherboard and hard drive? I suppose it is possible if one failed that it could take out the other. Still, we don't know much about "a local repair shop". Was this a place where people really know about Macs?
I have a Mac that is 10 years old and running well. Now that's not to say that Macs made today are the same. Think about modern cars made of plastic and compare those to 40 year old cars made of metal. Which ones will still be on the road 30 years later? Here's Apple's official statement (basically 5 years):
Vintage and obsolete products - http://support.apple.com/kb/HT1752
Apple's software support is also a nominal 3-5 years. After 5 years it's rare to find updates that apply to your computer.
The above is not saying anything about how long hardware should last, just that after 5 years they don't even want you walking in the door with an older computer because as far as they are concerned it's ready for the recycle pile.
With 4 years I would say your 2008 computer met a slightly early demise. On the other hand if you had walked into an Apple Store with it they would probably have looked at you somewhat askance and honestly, totally fail to comprehend why you aren't already looking for a newer machine. We bought an iPhone last December and when I asked about how many years the battery would last the salesperson said, "Oh, at least two years, by which time you will be wanting to replace it with a newer model anyway." Okay, should I be anticipating still using this iPhone 6 years from now?
Your iMac probably needed some software diagnosis and repair which you could've gotten from either an Apple store, an Apple authorized reseller/repair center or right here in these forums.
If you took your iMac to just a general computer repair center, chances are these people didn't know much or any at all about Macs or Apple computers.
Lots of very knowledgeable and extremely helpful Mac users here.
Turning the Mac on and off randomly when it won't start properly is not good for the OS or components.
Also, how careful were you when transporting it?
iMacs are not laptops. The components and HD in iMacs aren't really designed for constant transportation for prolong periods of time. iMacs are desktop computers and are designed as such.
Three years is a very short time for a Mac to go completely bad, but since you admit that is was not that we'll cared for and didn't do any thing to solve your issues earlier on, it may be possible an iMac could undergo fairly catastrophic failure.
Relatively speaking, hardware-wise, you should be able to get between 6-8 years of useful life out of a Mac.
In my case, I pushed this to almost 10 years.
That said, Apple tends to decide to obsolete Macs within a 4-5 year range by limiting what hardware will run their latest operating system. Sometimes it can be sooner than this.
Doesn't mean that the Mac isn't still useful past this time, it just means Apple will no longer support it or have any more OS software or software updates for it.
I think your iMac just needed some early repair/maintenance.