Avinu Malkeinu began, according to a well-known Talmudic account, with the second-century sage Rabbi Akiva reciting a short prayer of only a few lines during a drought, after a more elaborate prayer by his teacher had failed to bring rain, and tradition credits Akiva's simpler, direct petition with succeeding where the longer prayer had not.
From that small core the prayer expanded considerably across the medieval period as later communities and prayer book editors added further petitions in the same repeated pattern, so that versions used today commonly include several dozen lines, covering requests for health, sustenance, forgiveness, redemption and the wellbeing of the people, all opening with the same address, our father, our king. This history of accretion means Avinu Malkeinu exists in genuinely different lengths and with different specific petitions across various communities and prayer book traditions, unlike more textually fixed prayers such as the Shema, and its exact content has never been perfectly standardized in the way some other core liturgical texts have. Its double address, combining the intimacy of father with the authority of king, has been read by generations of commentators as holding together two seemingly opposed ways of approaching God, closeness and awe, within the very first two words of every line.