Settling directly on the square is probably not a bad move if it's a strategic resource. (Copper, Iron, Aluminum, Oil, Uranium.)
Here's my thinking:
Units stationed at a copper mine on flatland only get entrenching bonus (+5 to +25%). Copper mine on a hill gets a +25% bonus. But if you put those units inside a city you'll get the city bonus for defense. And sometimes it's easier to defend a single point on the map (the city) rather then trying to defend two points on the map (the city and the mine).
You'd also never have to worry about losing the resource due to a culture war, where the resource tile flips to the neighboring culture.