Very simple. It\'s to include Vaishanavite and Sivaite into same belief. The Sivaites believe Siva is the supreme being and Vaishnavite think Vishnu is the supremem being. How did they solve the problem? By bringing in Trinity making Siva as destroyer and Vishnu as protector and Bramha as creator. you just make everything inclusive for people to accept it. Same way, Ram worshipped Siva to make Ramayan acceptable to Sivaites. In reality, the hardcore vaishnavities won\'t worship Siva. just ask around Vaishnavities who know scripts.