I understand that baseball fields have warning tracks for the safety of the outfielders running to the fence. Then I wonder why they are made of dirt rather than grass? Grass in a different color would be good enough for outfielders to recognize that they are close to the fence and more safe than the dirt.
An outfielder making a play on a fly ball is usually looking up at the ball, not at their feet. A dirt warning track gives a tactile indication that the wall is near, and does not require the fielder to take their eye off the ball. Grass in a different color gives no warning at all unless the player looks at it - you can run into the wall without ever seeing the warning track, but it's basically impossible to get there without stepping on it.
The warning track was added league-wide in 1949 after some injuries, particularly a nearly fatal injury to Pete Reiser of the Brooklyn Dodgers, leading both to the warning track and to padded walls. It originated in Yankee Stadium several decades prior as an actual running track.
Per Doug Glanville, an accomplished MLB outfielder, the warning track doesn't really have much benefit. It's neither standardized enough nor wide enough to actually change anything for the players in most cases. It may help players time jumps (if they know how many steps there are between the track and the wall), and it may improve traction slightly.