。
She got off the train having left her bag on the rack.
Literal
She [topic-は] bag [object-を] rack [on-に] put [in state of-まま] train [object-を] got-off [regrettably-てしまう].
~たまま ('in the state of having done X') marks an ongoing condition that persists into the next clause — 'she put the bag down and left it that way, then got off.' The construction emphasizes the unchanged state. ~てしまう (here in polite past 降りてしまいました) adds the regretful-completion nuance — she got off and, by the time she realized, it was too late. The bag-on-train-rack mishap is so universal that it's a textbook situation in Japanese; railway 忘れ物 (lost-property) offices are well-organized institutions handling thousands of such items daily.