When I was that age, I did that too. I just felt all lonely and scared in my room by myself at night. I would walk down our long dark hallway, to go to my parents room, and squeeze in between them. They let me. I didn't do it to be a pain. I just felt lonely and missed them.
I grew out of it.
Kids at this age, also have night-time fears. Of noises, of being alone, of the dark, or anything. Its developmental.
Or, you just keep taking her back to her room. Maybe one day she will grow out of it. Each child being different.
Or, let her sleep in the floor, or your room. Or give her her own flashlight to have in bed with her. Or a lovey etc.
All the best,
Susan