She left the countryside to get a job in the city.

Literal

She [topic-は] city [in-で] job [object-を] obtain [in order to-為に] countryside [object-を] left.

~ために here is purposive ('in order to'), not causal. 都会で仕事を得る ('get a job in the city') is the goal; 田舎を出た ('left the countryside') is the action taken to achieve it. 為に is written with kanji here, which is slightly more formal than the kana ために. The sentence captures a common narrative in Japan and worldwide — rural-to-urban migration for employment.