. There are 2 viewpoints, one is to consider it as religious work, where the protagonists are Hindu Gods. The other is to consider it as a literary work like Iliad. Having Hindu Gods as a part of the plot was a recurring theme back then, as most of the works were influenced by vedic literature.
Ask questions if you neeed so