The reason isn’t cost, it’s not that expensive to add fluoride.
In many countries, particularly in developing nations, fluoridation of water is too expensive (since you need the infrastructure for it), and fluoride toothpastes are preferred instead. But in industrialised countries, where infrastructure for managing the water supply already exists, fluoridation of water is more effective. Places where tap water is more readily available (like the U.S., much of Western Europe, Canada, Ireland, etc.) will also be more likely to adopt the fluoridation of water.
The reason is we wouldn’t be adding anything to drinking water if there were better alternatives. If we started again with today’s standards, no scientist would recommend fluoridated drinking water.
Fluoridation of water still helps to prevent tooth decay, and in regions where it is cost-effective, it is a great benefit to public health! Of course, fluoride toothpastes are great, but it's not the best solution for everywhere.