The monuments of Ancient and Medieval times remain as the most important material allowing us to understand the past historical events in a better manner. There were different reasons that these monuments were constructed during the reign of the rulers.
The main reason that the rulers commissioned the construction of monuments was to commemorate events mainly a victory in a battle. It could also be for an event like a marriage alliance between two kingdoms. The core purpose was to leave a mark about the event and also to glorify their persona in history. In India, this is mainly related to the concept of Victory tower. Qutub Minar is one such example.
The monuments were also constructed to dedicate it to their loved ones as a token of remembrance when they leave this world. They would want to construct a monument that remains unique and remembered in history for the people they were constructed for. Rani ni Vav and Taj Mahal are examples of these monuments.
The rulers also built monuments like wells, dams, and tanks e.g. the step wells in western India. These public structures were enshrined in the name of the rulers and served three purposes- it helped in gaining popularity, supported the concept of Social Welfare, and helped gain blessings and good wishes from the subjects.
The rulers would not just compete on the battlefield but also in terms of magnificence in structures. Thus, each ruler would want to build grander and more artistic monuments and structures to compete with their enemies.
This is a very significant aspect when it comes to the reason of building structures especially in India. The various Buddhist rock-cut monuments, temple complexes in different parts of India are also examples of monuments constructed mainly for religious purposes. Sometimes these monuments served as a center for cultural and educational activities as well, and hence they grew in numbers over a period of time.
There was also an economic angle to this. The construction of monuments helped employ unskilled and semi-skilled laborers along with talented architects and artisans to sculpt their marvels. Thus, it generated employment on a huge scale.