Why is the sentence structure changed.
Changed from what? Mtanzania is being used as an adjective here, so, like all adjectives, it follows the noun.
Why isn't "Mwalimu ni mwanamke la Mtanzania " ?
'Mtanzania' is an adjective here, so it goes after the noun it's modifying
but also, it would be 'mwanamke wa, and that would translate to 'the teacher is a woman of a Tanzanian'