IMO, foosball and ping pong tables became common because compile times took so damn long. Work hard for hours, do a local compile of the module you've changed so you know it'll actually assemble/compile, submit your changes. Then, once or twice a day, everything gets built together (system integration) - and time pressure goes way down while we all wait. So foosball, or ping pong. One place I worked at in the 80s had a wallyball court (like volleyball but played off the walls as well). Why not? We'd all been grinding out code for hours; time to get some physical activity in.
This was maybe a decade before the whole dot-com thing happened. Computers got significantly faster, system build times dropped, so less slack time waiting as a team — and we mostly stopped playing wallyball — but the court was still there, and we still individually had time for ping pong as module build times hadn’t dropped to zero, so there was often at least one other person waiting. I don’t envy developers today.