To add to this, it is revealed in Hitchhikers that dolphins are super intelligent extraterrestrials. "So long and thanks for all the fish" is the superintelligent dolphins farewell to the last of earth/hummanity.
The mice were the mechanism by which the hyper-intelligent, pan-dimensional beings observed their experiment. The experiment being "what is the Ultimate Question?" by running a 10 million year simulation.
I'd say Douglas Adams novels are full of superintelligent and/or superpowered entities that don't always think things through properly. There's a serious Murphy's Law flavor to his scenarios, even if you're the President of the Galaxy or the Man Who Rules the Universe or a planetary engineer or the most intelligent robot ever built or whatever. You're still going to trip and fall, or experience unrequited love, or get stranded on a boring planet, or have an embarrassing misunderstanding, or concoct a wacky scheme that goes wrong somehow.
I know it is a saying, have read it before, but would prefer to hear the explanation from a person rather than Google.