Spores can survive atmospheric boiling temperatures of water. Often a pressure cooker is used to sanitize substrate (wheat, and many other things) to grow mushrooms on. This ensures the only spores that exist on your substrate is the ones that you want.
I believe you're referring to a mushroom growing technique called PF Tek. But following this technique, you are supposed to wait until the substrate is done boiling and has come back to room temperature before inoculating it with spores.
Spores can survive atmospheric boiling temperatures of water. Often a pressure cooker is used to sanitize substrate (wheat, and many other things) to grow mushrooms on. This ensures the only spores that exist on your substrate is the ones that you want.