I don't think "get away with" is entirely appropriate. Most utilities companies are highly regulated by state or regional boards or commisions. They frequently have to get permission to raise rates.
Why they have monopolies is a practical matter. Can you imagine the nightmare of having multiple competing companies working in the same neighborhood stringing up power lines or digging up streets for water services?