That sounds like the well-known iMac hard drive whine. Probably the fresh installation meant that there was less disk activity for a while, but as files became fragmented over a period of time, the level of disk activity increased.
This is just my best guess, but it makes sense.

I am not aware of any "fix" except installing a new hard drive.