The rovers had their power requirements and solar panels designed so that 90 days of mission could pass before getting occluded by martian dust. Once on Mars NASA discovered that occasional whirlwinds, which existence was unknown during mission planing, cleaned the panels back to usable current output levels.
They did consider various options, but nothing met the requirements.
"In short, there were possible methods, but nothing simple and light and certain. And the rover developers didn't have the time, the mass, or the leeway to experiment. Attractive though the idea was, this mission couldn't afford to try it."
NASA released some e-Books the other day. They go in depth into technical topics of space exploration. Perhaps one of the books describes the challenges of wiper blades.
Fans would be a smarter solution. Wiper blades plus dust and dirt = a mess, not necessarily clean solar panels. Engineering something that would be reliable on Mars would be rather difficult, and would add mass and complexity to the rovers, which would take away from the mass needed for other instruments and time needed for testing everything else. Also, dust buildup on the solar panels was only one factor limiting the expected lifetime of the rovers, so instead they chose to balance the engineering of the vehicle and concentrate on hitting the base mission lifetime expectancy.
It was also luck.
The rovers had their power requirements and solar panels designed so that 90 days of mission could pass before getting occluded by martian dust. Once on Mars NASA discovered that occasional whirlwinds, which existence was unknown during mission planing, cleaned the panels back to usable current output levels.