Why Different loka of Each God

Why there are different Lokas in Hinduism like Shiva Loka, Vaikunth Loka, Brahma Loka, etc. when all gods are one and same???