ELI5: what is the point of bed rails?

Do I need to buy bed rails at some point? Are they necessary even with a floor bed?

I feel like my baby sleeps super close to me, if I try to scoot away from her she just moves closer, and I wake up when she twitches, so I would feel it if she started to roll away from me towards the edge of the bed (she’s about 6 months old and can roll but can’t crawl). But maybe I’m wrong, so if I do need bed rails, give me your product recommendations.