Sigh.
Never mind. Clearly you don't understand what "from a legal perspective" means. At law, the action is what is relevant. Whether the action is discovered or not is, at law, irrelevant. For example - if you enter a home without permission, you have committed trespass. Whether anyone sees you or not does not matter, or, if you prefer, is irrelevant.
I'll begin by saying that your attempt to include "legal perspective" is laughable and a clear attempt to conflate your poor argument with puffery.
Despite that, I will indulge you. First, of course the action is relevant, however we know there are other factors: intent, state of mind, etc. Be clear here as well, opening your computer and taking something out is not a legal matter. Nullifying a contract (the warranty) is, however, a legal matter.
Moving on to your example of the trespasser, it is nothing more than a tautology; it can easily fool the casual observer that you have made a point but in reality you have said nothing that relates to the debate at hand.
if you enter a home without permission, you have committed trespass
Yes, the person has trespassed. However, this self-evident statement tells us nothing. Your claim was that the mere act of removing the optical drive voided the warranty. Abstracting this claim and fitting it to the trespass, the equivalent would be something like; the mere act of entering a home without permission results in jail time. In other words, the act leads to a seemingly automatic consequence. We know of course that is not how it works.
Funnily enough, the missing piece of the puzzle is legal process (something you seem to be very keen and knowledgeable about). The perpetrator is innocent until proven guilty and due process is followed to establish wrongdoing. If there is no evidence of the wrongdoing then no crime was committed and most importantly no consequence is enforced.
The consequence is key, as your most recent argument removed the consequence and supplanted a truism in its place; bordering on equivocation but so poorly constructed I don't know if I would give it the credit.
We can also flip the original claim to match your most recent. If you remove an item from your computer you have committed modification. Which of course says nothing at all.
Lastly, you spent time saying nothing as opposed to countering what I presented straight from Apple: that the mere act of modifying the computer does not void the warranty. Apple says nothing of the sort, Apple simply says they will not cover damage caused by such acts and even then, Apple does not say the warranty will be voided if they find that to be the case.
Conclusion: If you open your machine and break something AND Apple can prove it, you are going to have to foot the repair costs. Only at that point can Apple take the step of voiding your warranty but this would most assuredly be subject to appeal as Apple makes no mention of the policy surrounding warranty cancellation. In addition, Apple would be required to make a prorated refund in most US States.
Simply making unauthorized modifications does not automatically void the warranty as claimed by individuals here.