Some people here posting like wizards don't get attacked, lol.
In the last Pathfinder game I played our party wizard was getting pounded *all* the time. As soon as opponents knew who the wizard was they knew he would be the easiest person to take out of commission. Luckily, in 3.X spell casters have all sorts of ridiculous ways to survive and skirt damage.
Not all opponents are intelligent, and not all opponents have the abilities to attack a caster in the back. No one said they never get attack, only that is MUCH less frequently than say the frontline melee, also a ranged Archer can be just as deadly as the Wizard.