Why did Iran develop so many cities despite its lack of rivers. Most cities are also not adjacent to the caspiAn sea or Persian gulf. Why were cities founded where they were?
A large portion of Iran has a completely "normal" climate that doesn't preclude the existence of settlement. Some areas in Iran have been settled since the Paleolithic. The areas that are desert in a large portion of the country are moderated by the presence of the coast or have settlements along the rivers that cut through the mountains. Only the interior east is not really settled.
The western portion of the country has a rather pleasant Mediterranean climate. Iran, by both the amount of arable land and the amount of that land that is actively cultivated, is in the top twenty countries in world in that regard.
To answer your question, I'd say that these things probably helped:
A lot of the major urbanized areas have been occupied for a long time, up into the millennia in some cases. A handful of other cities were created later as military outposts (Kerman comes to mind) and have been populated since.
Were you to look at a population density map, you'd see a lot of cities in the same area that food is grown, where rivers are, where roads meet, or where there is a transit corridor through difficult terrain.
I don't understand why you say there are not cities along the Caspian or Persian littoral, though. Each of those has a city no more than like, ten or fifteen miles away from each other along the entire coast. It's nowhere near as dense as, say, Teheran's metro or the agricultural belt in the western part of the country, but Iran still has almost eighty million people in it.