Nope. It is not to look for dirt. It is to check for leaks in a gas tank.
I bought a used tank on ebay that required a bend along one edge, in order to get it to fit on my bike. The tank was clean and I wanted a preliminary test for a leak at one spot near a seam. So I used a rubber band to secure a white rubber glove over the tank opening. I then hooked a piece of fuel line to the petcock and inflated (by mouth) the rubber glove. Finally I put a little soapy water over the suspect areas to check for a leak. I found none.
This may be a reasonable way to look for leaks if the tank is clean, but it has not passed the final test of filling with gas and seeing what happens.
If I can figure out how to post a picture from my hard drive then I will include it. Looks ridiculous.