Maxperson
Morkus from Orkus
The first example there was a bad one. Even monsters that are not suspicious might notice a foot sticking out or the red of the hiding PCs cloak through a crack between the crates. While going into hiding might be an auto success if it's easy enough, the outcome is in doubt since the monster might notice the hiding PC, so a roll is called for to set the DC for the creatures' chance to notice.Well where's the failure then? All is totally narrative.
If success is automatic you can let the PC roll anyway to keep the tension up or to increase it.
Also in the second example, you could theoretically let them roll this one also, but tell them it is with disadvantage and set the DC to 35.
For the second example, there's just no point in rolling. Why waste everyone's time by slowing the game down for a useless roll? The second was also a bad example at showing an automatic failure, as an inability to hide isn't a failure to hide.
A better example of an auto failure would be if a PC tells the DM that he is going to push the boulder that is from where it's sitting in the ground to a different spot. The DM knows that the boulder is only showing about 10% of its size above the ground, so there's no way that the PC can push it. He narrates the attempt to push the boulder failing and the PC not even being able to budge it. The narration is about the failure.