Why do doctors and other persons with a degree have to redo it when coming to Canada or the United States?

For doctors and dentists, they don’t have to redo their degrees. They do have to additional training, some of which might repeat earlier training.

This is especially true of clinical training and experience. Pre-clinical training can usually be demonstrated by taking an examination.

Some other professionals might have to take additional training, eg, optometrists, podiatrists, nurses.

The situation is quite complicated for lawyers. Lawyers from common-law countries (Britain, Canada, UK, Australia, probably some smaller countries) have less difficulty when they come to the the US. Lawyers from other countries probably need to go to law school all over again.

If a profession isn’t licensed then no one has to redo their degree.