That phenomenon is not really connected with being near the coast. It's more a matter of places that were once conquered and re-named, mostly by the Spaniards.
Conquest and subjugation of the local indigenous population, you see, was a brave, heroic, macho accomplishment, which made them really feel good. So when they erased the names that the local people had given the places, they very often re-named the places in honor of their king, or in honor of religious figures such as Saints ... "San" for a male saint, and "Santa" for a female one.
At great distances from the coasts, you have San Antonio, Santa Fe, Saint Louis, etc.