Lord Shiva is in charge of all the demigods. Therefore, Krishna brought them to their guru. Similarly, we are all disciples, we are all devotees and Krishna has directed us to our spiritual master. So, in the same way he is serving that same function as Lord Shiva is serving for the demigods.