discovering purpose is discovering life. If you had persisted with forcing things to become a medical doctor, even if you ended up being one, you may not affect lives as expected because that is not where you are supposed to be.
Some things we consider as failure are actually the way out for us to meet destiny.