That is how democracy works.
I think there ought to be a line between democracy and "mob rule" by having some sort of "safety valves" in place to put in a check, just to make sure that a society isn't succumbing to a mob rule, especially on irreversible decisions. It's not like large numbers of people are immune to making bad decisions, holding wrong premises, or making decisions for wrong reasons.
I think you guys might have something in place though. If I'm correct, your Parliament must now vote to repeal legislation and EU treaties and such before you can legally separate. I'm pushing my limits on British specific politics at this point though.
The majority that bothered to vote (if they didn't vote they didn't care enough)
I don't know that people not showing up to polls is a license to tell them what to do with their lives or make irreversible decisions for them. It may be a license to tell them they're dumb for not showing up.
in the UK as a whole (the Scots have already had their chance to leave the rest of the UK) voted "out".
Why can't the Scots have another vote? Maybe they changed their mind due to changing circumstances? This is what happens with unchecked political processes.
Northern Ireland can also vote to leave the UK if that is the wish of the majority. It's called democracy. It make no difference if it was a slim majority it was still a majority.
I think people have to be careful of slim majorities. It's not as if the majority can't be tyrannical on a minority of people. A majority of people, especially a slim one (or a 37% "majority"), seems like shaky grounds for dictating irreversible decisions for other people.