It was because you could get cramps while swimming and then drown. This seems ridiculous (and it is) but I saw one of those "educational" school film strips where some kids died because they didn't wait 30 minutes after eating before going for a swim.