And just as an aside, I don't understand how any just, loving God would have a problem with one of his own learning to take care of other humans by studying from cadavers. I tend to think God would be pretty proud of this, in fact.
I do not want to start any kind of religious flamewar, so hopefully I can answer this without any issues. The Jewish religion is based on thousands of years of tradition, and so a lot of what comes from tradition is based on all of that history.
The ordinance that priests not come in contact with a dead body is straight from the Bible (Old Testament, look in Leviticus for exact wording). The purpose was so that the priest would not have any issues with his body not being "holy" at an unexpected time, especially when he could be called to work in the Temple on short notice (and priests could not have an "unholy body" when working in the Temple). For this reason, a priest was only allowed to come into contact with the dead bodies of 7 people (mother, father, son, daughter, brother, sister, spouse). The current practice of priests not coming in contact with dead bodies is because of the religious tradition of anticipating for the coming of the Messiah. Because of this, priests are still not allowed to come in contact with a dead body.
Now, considering the fact that thousands of years ago medicine was mostly guesswork and potions without any modern science to back it up, and there was very little that could actually be done to help people, priests generally did not consider medicine as a career. Modern medicine on the other hand, is very different. You could argue that the current process of medicine is no longer guesswork, and being a doctor is really about preventing people from getting sick and dying and that you can really help people.
As far as a "just, loving God", that might depend on what you think God would be more proud of. Does God value you upholding His laws and not come in contact with a dead body? Or does God value a person going into medicine to help people? It's almost impossible to answer this question, and you can argue either way.
As always, a person's religion is their own beliefs and tenets. If someone wants to follow in their practice, then let them do so.