Ruth while compiling those batting stats also played in the field his entire career. Ortiz has been a DH for the past ten years or more.
On the other hand, Ruth faced the same pitcher for 8-9 innings per game and in those days most teams had only 4 starters. Batters were able to get to know pitchers real well back then.