I think that it is fair to say that most children play the “don’t touch the floor; it’s lava” game as children. I know that I did. No one taught me this game. I had never heard of a friend playing this game. I had no older siblings who played this game. It was a fun exercise and, in its own small way, helps to build survival skills. While the “lava” part is due to the expanse of human knowledge and scenarios seen on television, that kind of game is almost instinctual.
One of the purposes of play, particularly as children, is to build survival skills (and to practice social interaction, of course).
There is a lot of speculation about why people find zombie apocalypse stories so fascinating and appealing. Some say that it is because, symbolically, it has to do with anything from 9/11 to living in a world that has nuclear and biological weapons. Some say that it’s a secular way of telling a Rapture story, while others say that it is because we all have the potential to become the enemies of our neighbors and family members.
I am sure that bits and pieces of those are factors in a lot of zombie apocalypse stories. In some cases they might influence writers. In other cases, they might subconsciously influence readers and viewers and gamers to enjoy the subject matter.
Personally? I think that it partially goes back to the basics: practicing survival skills through learning and play. Most of the people who enjoy zombie apocalypse fiction make plans for what they would do in such a situation. Would they fortify their homes or a friend’s home? Whom would they bring? What would they bring? How would they protect themselves along the way?
These questions are applicable in a lot of situations that are, while unlikely, more probable than hordes of slow-moving undead that are ..