Asking where something is I have heard people use 不好意思，请问厕所在哪里？for 'excuse me, where is the toilet?', and also 对不起 for 不好意思, although I think 不好意思 sounds more natural.

My question is (and notice the pun): what is the role of puting 请问 before 厕所在哪里? My thought is that 厕所在哪里? probably sounds too 'direct' and 'demanding', and we add the extra 请问 to soften the question. So for instance, if a teacher is angrily demanding where a student's homework is, they would just say 你的作业在哪里?
And if a naughty child has hidden the car keys, his mother may say 车钥匙在哪里?
Yeah you've pretty much got it.

请问 is just a good, polite, way of giving the other person a heads up that you want to get some information out of them.

It's not necessarily demanding to drop the 请问, it all depends on your tone of voice.

If you're looking for more demanding way just drop the 在哪里 altogether and add a 呢 on the end while being overbearing. 呢 can also be fine by itself but again, it mostly depends on your tone of voice.