Sure they can, but many don't either because of lack of time, or quite frankly, because many doctors are bad at their job. And even in the best case scenario we will never be able to provide doctors to 100% of the population. For many people the choice won't be AI or a (free) caring, passionate doctor who has time to understand you and answer your questions, it's AI or nothing.
Same with teaching. A lot of people simply don't have access to teachers, and if even the ones that do, might not have teachers that have the time and knowledge to actually teach what they want to learn.