It was always supposed to be multi-role. The air-to-air role was done first because that was always the priority, especially as F-3 was being withdrawn from service, with the various air-to-ground capabilities to follow. It all just took a tiny, little bit longer than planned. But that's what you get when you have a a multinational consortium.
I take the point about Grippen, but the introduction of another type doesn't simply mean buying the aircraft. The entire support organision, clearances, integration, training etc means that the two for one airframe cost is soon lost in the noise. Lovely aeroplane, though.