In the USA, many or most speed cameras are owned and operated not by the local police or city, but by a private company that keeps some percent of the fines they give out.
They are contracted by the city, country, or other authority. They are not randomly placed or operated without permission.