They were bases in Iraq being used by US troops.
Are you suggesting Iran just randomly attacked Iraq, and the airstrikes had no relation whatsoever to the US drone attack?
The two bases were Iraqi bases, under their control, that housed both their troops and ours.
They could have attacked a number of completely American bases in sunni countries.
They did not because Iraq is a client state. They did not because the particular bases chosen were huge, with vast amounts of open spaces, thus they could attack an Iraqi base, with plenty of room to miss Americans.
They got a great propaganda coup for their own people, attacked an allied, country thus avoiding the problems of attacking a hostile sunni country, and they made sure they missed everyone.
So, their "revenge" was a tempest in a teapot. They made sure no Americans were harmed, because they were afraid of the resultant response.
Bullies always back down when they are called out by someone who can hand them their *** on a platter. Further, islamic nations respect power and force, they view all else as weakness.