I'm having a brain wreck type of moment recalling this exact type of thing happening in an episode of something. It was a Twilight Zone type of series from a century ago...
I just watched this last night, rewatching TNG after a couple years and remembered I loved this episode so jumped in here. What a lovely coincidence to see this meme today!
Also agreed - why did Data shut down Riker like that? Was Data so certain decompressing the shuttle bay wouldn't work?