The bubbles form as air is entrained in the water during the pouring process. The key factor here is how fast the bubbles collapse. This may seem a funny distinction, but bubbles are always thermodynamically unstable compared to the bulk liquid because it always costs energy to create them. The only reason we see long lived bubbles is that there is a kinetic barrier that stops the water films collapsing.
This image shows schematically what the water film in a bubble looks like (this is a soap bubble but the principle applies to all bubbles):
The water contains a chemical (soap in this case) that is surface active i.e. it preferentially adsorbs on the surface. In the case of soap the end that sticks into the water (the red blob in the picture) is negatively charged and the negative charges on the opposite sides of the water film repel each and stop the film from thinning and collapsing.
In your case you say there's no soap suds present, though note that there may be very small amounts of surfactant present, even on apparently clean glass, because surfactant adsorbs on glass and it can be difficult to wash it all off. However lots of other things are surface active including many biopolymers, and your glass may have traces of some polymer. Absolutely clean water in an absolutely clean glass will not form a stable foam, so in your case there must be some contaminent present, either on the glass or in the tap water.