Some external professors are in the same field and others are not. They serve different purposes. They might be paid a small stipend, but it is usually (as far as I know) just an honorarium. The receiving institution probably also pays for travel and lodging if the person is from away.
For the professor it is just a part of service to the profession. Their own institution may provide some recognition for it or not. Often annual evaluations are on research, teaching, and service.
However, the purpose of an in-field visitor is, at least partly, to give some external validation to the program that is visited. I've been asked if I think the entire program is up to the standards I would expect. This help prevent academic incest where a department only speaks among its own members and loses connection to the larger goals. "Would you give a doctorate to this candidate based on the thesis and overall program?" Here the visitor is from a different university for this to make sense. Sometimes from a different country.
The purpose of an external member of an examination committee, however, is quite different and may even come from the same university. In mathematics, the visitor might come from philosophy or a language department. They are normally not expected to read the dissertation and couldn't be expected to understand it. But they are expected to ask a question or two of the candidate and the quality of the answer can be heavily weighted in the evaluation of the student. Sometimes it is just a request to explain to the visitor some terminology used in the defense talk. A layperson's explanation is expected, and the candidate normally is expected to do a good job with the answer. Advanced students who can't intelligently discuss elementary things in their field are at a handicap. I've heard of situations in which the examination was failed for this reason alone.