From John Thorn, MLB's Official Historian:
On June 27, 1911, there was an unintended consequence of an attempt to speed up the game. American League president Ban Johnson had issued a directive that warm-up pitches were now banned, because they were time-wasters. Once the batter stepped into the box, any pitch that was thrown would count.
On June 27, Stuffy McInnis moved into the batter's box and smacked a warm-up pitch before any of the fielders were in position. He ran around the bases for an inside-the-park home run. It was after this incident that Ban Johnson vacated the edict, and warm-up pitches were again allowed.