Why Hindu temples are built next to water bodies?
The appropriate site for a temple, suggest ancient Sanskrit texts, is near water and gardens, where lotus and flowers bloom, where swans, ducks and other birds are heard, where animals rest without fear of injury or harm.
[1] These harmonious places were recommended in these texts with the explanation that such are the places where gods play, and thus the best site for Hindu temples.
[1][4]
Hindu temple sites cover a wide range. The most common sites are those near water bodies, embedded in nature, such as the above at Badami, Karnataka.
The gods always play where lakes are,
where the sun’s rays are warded off by umbrellas of lotus leaf clusters,
and where clear waterpaths are made by swans
whose breasts toss the white lotus hither and thither,
where swans, ducks, curleys and paddy birds are heard,
and animals rest nearby in the shade of Nicula trees on the river banks.
The gods always play where rivers have for their braclets
the sound of curleys and the voice of swans for their speech,
water as their garment, carps for their zone,
the flowering trees on their banks as earrings,
the confluence of rivers as their hips,
raised sand banks as breasts and plumage of swans their mantle.
The gods always play where groves are near, rivers, mountains and springs, and in towns with pleasure gardens.
— Brhat Samhita 1.60.4-8, 6th Century CE
[21]
https://en.wikipedia.org/wiki/Hindu_temple