I had this very same problem and it has to do with the design of the unit. IN my case it was a GE Water Heater. GE water heaters are manufactured by Rheem. The insurance industry mandated the installation of safety devices which, when tripped by a flammable event, would shut off the air flow to the water heater and render the unit safe. For example, if gasoline were to spill near the unit and the pilot ignited fumes, the safety switch, which is a thermal glass sensor, breaks and triggers the damper to close to shut off air to unit. That mandate changed the design of many water heaters.
Whirlpool has air flow through bottom of unit and suggests you mount the unit on a stand or bricks, other manufacturers use a 1 inch opening that rings the bottom so 360 degrees of fresh air can enter the unit. GE uses a band of perforation holes 3/4 of the way down the unit to draw in fresh air. These holes must be free and clear for the unit to operate well. The GE manual says at least 1 inch of clearance, it actually needs much more.
GE water heaters need air flow to create draft in order to operate. My pilot light would light but then go out shortly after the burner ignited. It is not the thermal coupler as it would stay lit, it would ignite the burner, the burner would operate, but then the whole thing shut down, with no pilot a short time after th burner turned on… It was all air flow. It works fine now. I had a plumber out to look at it and he could not figure it out, only after much research and Googling did i finally see one YOU TUBE video documenting this issue and it worked first time.