No inheritance doesn't compel Apple to unlock that inherited property. Imagine it like a safe. You might inherit a safe but there is no obligation on the manufacturer to help you unlock it.
I think a more appropriate analogy is that this is like a safe deposit box. You lost the key. The bank is obligated to help you out, even if for a fee to drill the lock.
Where the analogy breaks down is the level of difficulty --- even the strongest safe in the world is crackable given enough resources, and we know how to do it very well. Good encryption is impossible to break within the lifetime of the known universe.
I say this as someone who has sadly had to explain to others a few times, that recovering encrypted files is nothing as easy as "busting it open" in the physical world.
This is incidentally why governments are scared of encryption, but IMHO users should be too --- it is very, very strong technology. Encrypting data with a suitably secure algorithm and losing the key means it is truly gone forever. You have to weigh that risk against the risk of someone else getting access to the data.
To push the analogy, if you need a code to open your safe, but forgot to put the code in your will, is the manufacturer required to provide you a master key?
The deceased is expecting to make the necessary preparations before dying. Facebook has a system to let a user allow trusted user to takeover access, or let a user allow a group of friends to agree to takeover access; which both seem good methods of handling inheritance of account data.