They play 162 because baseball as a sport tends to have extreme variance game-to-game due to luck. The idea is that the luck will even out over such a large sample size.
Yea there is tons of travel and that’s why you normally see teams stay for 3-4 game series. The schedule used to be more “regional” like you’d play the eastern teams a lot more if you’re in the east, but this year they actually changed it so every team sees all 29 other teams at least once.