Your confusion is justified because using the explanations given, it’s not a good joke.
There was an earlier similar joke posted that made much more sense. In a different episode of Star Trek, Beverly tells the computer to define hot as 1.9million Kelvin. This was shown in a panel of the earlier joke. So the Picard Earl Gray Hot joke becomes when Beverly asks for Hot Tea, the computer generates 1.9M Kelvin temperature tea causing the Enterprise to explode.
Unless the joke is you already have to know that whenever Beverly says “hot”, the Enterprise explodes. In which case it is a very good subtle joke.
But why would ordering it the other way make the ship explode?
Your confusion is justified because using the explanations given, it’s not a good joke.
There was an earlier similar joke posted that made much more sense. In a different episode of Star Trek, Beverly tells the computer to define hot as 1.9million Kelvin. This was shown in a panel of the earlier joke. So the Picard Earl Gray Hot joke becomes when Beverly asks for Hot Tea, the computer generates 1.9M Kelvin temperature tea causing the Enterprise to explode.
Unless the joke is you already have to know that whenever Beverly says “hot”, the Enterprise explodes. In which case it is a very good subtle joke.