When I was a kid, I did that.
I would, creep down our dark scary hallway, and go to my parent's room, to sleep with them. They let me. It was no big deal to them. They knew I would grow out of it one day, and I did. They got sleep and I got sleep. It is one of my fondest memories, of my parents.
The way a child goes to bed, will be a fond or hated memory. And they will remember it.
Developmentally, kids from this age get "fears" of the dark or noises or anything. It is normal. They also start to have nightmares. They like to be near their parents.
Me, I missed my parents, sleeping in my room. Even if my sister was there too. I was close to them. My sibling was not and was a cold snarky person who teased me about it.
For me and my kids, they did that too. No biggie. We had a floor mattress in our room that they could sleep on if scared or it sick. It was fine. They got sleep and we got sleep. And they are very confident self-assured kids.