As per the legend, Lord Rama had asked Hanuman to bring a shivling from Kasi. But Hanuman was getting late, as the auspicious time was getting delayed. So, Lord Rama worshipped the shivling made by Mother Sita out of the sand. When Hanuman came with the shivling, that shivling was also installed there. That’s how there are 2 shivlings there.