It is true that God is often depicted with a spouse in our traditional stories. However, on a deeper philosophical level, the Supreme Being and the Gods are neither male nor female and are therefore not married. In popular, village Hinduism God is represented as male, and God's energy, or Shakti, is personified as His spouse for example, Vishnu and Lakshmi.
Hinduism is taught on many levels to many different people, and to uneducated people who are not able to understand high philosophy, Hinduism is taught in story form. Because the temple is the center of every Hindu community, and everyone is focused on the temple and the Gods within it, the Gods are the major players in these stories. Hindus who understand the higher philosophy seek to find God on the inside while also worshiping God in the temples.
The stories illustrate how a family should live, how they should raise their children, and much more.
Those who learn the higher Hindu philosophies know that Gods are neither male nor female. In fact, attaining to that Godly level of being is one of the mystical goals of yoga. This is necessary in the technological age, necessary in order that Hinduism will be a religion of the future, not of the past.