Thank you for the details of the issue you are experiencing with Wi-Fi on your iMac. I would be concerned about this too.
I recommed following the steps in the section labeled, "Symptom: The network connection drops unexpectedly" in the following article to resolve an issue like the one you described:
Thank you for posting in the Apple Support Community.
Thanks, Sheila M.
I found this reference myself before your reply, and it may be useful in the future. Actually, what solved the problem was repositioning the network extender I just bought. Once I got it centrally located and programmed all devices properly, I had no further problems with my iMac, and as a bonus, got my smart TV to now automatically go on wifi.
Thanks again, though.