I have a similar 2011/21.5" which I bought in 2012 (really cheap - because), USB ports 1 and 3 (seen from the rear left) supply power but no data. Also the SD card is non-functional.
Its been like that since I got it, and in use every day until now, with no problems with the other 2 USB ports.
I have a Thunderbolt 1 dock attached which gives me a USB 3 port and further USB 2 ports (and a second monitor port), so that has been my solution.
TB 1 docks have long since been obsoleted so are relatively cheap on eBay etc. Mine is a Matrox, which works with Mac OS from Lion to High Sierra.
The Apple hardware test checks out as OK, so it doesn't see that the ports as faulty. When I opened the iMac to put in a SSD I had the logic board out to see if could see the fault, but there was no sign of anything wrong. So I left it as it was, and am still using it today.
The TB dock is rock solid, but the USB hubs that I've tried were sometimes flaky with self-powered usb 3 hard drives.
Firewire isn't compatible with USB.