The shift was first used in the Devil Rays' 7–4 loss to the Red Sox on 18 April 2006 at Fenway Park. Though Ortiz was 2-for-5 in that game, the tactic was successful and a number of other clubs employed it against Ortiz, with his batting average dropping from .
Who was the first MLB team to use the shift?
It's generally believed that Indians player-manager Lou Boudreau invented the shift -- it was even called "the Boudreau Shift" -- but as Glenn Stout notes in Red Sox Century, the first to use a shift against Williams was White Sox manager Jimmy Dykes, on July 23, 1941.
Why does the infield shift?
Defensive players normally move around a bit within their normal positions. Infielders move closer to the plate against fast batters and further from the plate against slower runners. Outfielders move closer to the plate against hitters with little power and further back against ones with more power.