It's always safe until it isn't.
I really don't like the thought that if you would do it at home you would be fine on the ship. Do complete strangers have keys to your home and access to it when you slip out for a drink. Probably not however several people have access to your stateroom if they want. I would bet most staff could
get access to it if they wanted. Its not like these sort of things never happen on cruise ships, a quick google will show you different. And yes, it has happened on
DCL. This is a floating city with 6000 strangers on board. Even those you meet in the chat rooms before your cruise, do you know them? Hardly. And that is only one scenario. What happens if there is an issue with the ship and you can't get back to your cabin? What happens if for some one in a million chance a fire starts in the stateroom. What happens if your ten year old who is brave enough to say go ahead and leave us wakes up and suddenly realizes she/he is not as brave as she/he thought? How scary could that cabin be at night when no adult is around?
Leaving young children alone is not something I would ever do but that is just me. I know people who do and nothing bad has happened but I bet if something did they would regret it for the rest of their lives. The cost of going out to get a drink could be more than someone is willing to pay.
Sorry if I sound dooms dayish but that's the way my mind goes. I'm a 'better safe than sorry' type of person. Only you can make the decision for you. Just make sure to have a good, safe vacation.