Most mothers probably wouldn't choose to do this in public, but there's nothing so urgent as a squalling baby. It is legal, but, unfortunately, some people don't seem to know that.
Countries around the world, including the U.S., have passed laws to protect women's right to breast-feed in public places. Unfortunately, this hasn't ended the harassment many women have experienced. I originally encountered this crafty comic on a website for crocheting accompanied by photos of this inspired creation:
Read more here about why supporting breast-feeding in public is important to supporting breast-feeding anywhere.