It should not matter if you have the exact line "To be or not to be" verbatim if you can explain what Shakespeare tried to convey about suffering and the meaning of life. More importantly, you should be allowed to have the book! You can't expect to jump from confusion to comprehension by reading the whole thing during the exam.
It shouldn't matter if you can regurgitate "Miranda v. Arizona, 1966" or not if you can explain when a person is giving voluntary statements or is under custodial interrogation. Access to the full PACER database wouldn't enable you to understand those distinctions.
And as comes up here all the time, it shouldn't matter in a whiteboard interview whether you have the arguments reversed in your strcmp(), an editor, compiler, or reference (or just running the code) would show you which way it was supposed to be. The important thing is the planning, algorithm tradeoffs, data structures, and debugging process that you used to write the thing. Heck, it shouldn't even matter if you can remember that the function is called 'strcmp'.
Reliance on these factoids usually indicates that the grader is taking the easy way out - scanning for expected quotes, for case names, or compiling the code and seeing if it works or not - rather than gauging comprehension. I'll grant that it is far easier to do the former, but that's not what the goal is supposed to be.
Edit: What can't be allowed is regurgitating someone else's comprehension of the question while having none of your own. If that's a possibility, you need to either ask different questions or have some way to prevent people from accessing that explanation. Remote exams need more of the former and less of the latter.
Isn't that just testing for memory rather than comprehension?
All of my BSc Applied Physics exams including the final (Exeter Uni. 1977) were open note and this really helped sort the competent students from those who thought that they were at university to learn facts. The latter brought fifty litre rucksacks full of notes in to the finals and without exception either failed entirely or scraped through to third class honours.
They seemed to have not realized that the faculty would not set questions that could be directly answered by looking up the question in one's notes. The best example was the final quantum mechanics paper which did not contain a single question that had a direct answer in the notes we had taken or the textbooks we had used.
My most recent exam was a C# course and that exam was open book. It wasn't as extreme as my QM final but had basically the same idea: apply what you have learnt.
I want my lawyer to double check the sources. Even if he has the case name memorized, joe vs sally is easy to get confused with joe vs sue (or sally vs joe...), and those details are important to get right, lest I lose the case on a technicality.
There is a time to memorize details, but for the most part I want people who verify before making a statement.