If inheritance didn't exist, I imagine people would achieve a similar result by gifting everything to their heirs towards the end of their life. And there would be cases where someone meant to do so but died earlier than expected, or where someone did so when they thought they were dying but then ended up living 10 years longer. Compared to that world, inheritance with wills is more convenient and orderly for everyone involved, but it is not the thing that enables people to pass things on to heirs.