This will be a smaller more simple version of the mega history I know of. (I'll write the mega history later on after I brush up on some material)
So where did bdsm and everything come from? Hard to say, but the best people have figured out is that it dates back to ancient Greece, ancient Egypt, ancient China, so on, it's kinda always been around under some name or another, sometimes it was open and part of a culture, other times it was underground, or in cases like places like Germany, it just casually and quite literally became part of their culture and infrastructure.. How? No clue but again, it's always been around.
For some cultures it came from the war times when kings or men of the castles / elite were away for months or years at a time and the marriage they had if they had one would then become an open marriage and the wife/queen would get male suitors and the husband/king would get female suitors. In other cultures this term and practice was called "bed warmers" which acted like cuddle buddies and the relationships weren't always sexual in nature either.
In ancient Egypt they had varying levels of servants and Greece did similar that different servants where tasked with different duties
For whatever reason, there has always been naturally submissive and naturally dominant people, it happens in nature all the time too with plenty of pack animals fighting for dominance or delegating tasks to animals lower in the higherarcy.
It's just always been around since ancient times, I dunno if this history just isn't taught anymore or people just don't know but you're all part of something extremely ancient and beautiful.
Pets, slaves, whatever kind of submissive you are, you're part of something that's incredibly ancient and I just think that's neat.