How did she ever come to hold such a view?

Literal

She [topic-は] why such-kind idea [object-を] hold [come to-ようになった] [explanatory question-のか].

Two grammar pieces fuse: ~ようになる ('come to do, become able to') marks a change-of-state, and のか stacks explanatory の plus question か, framing the whole thing as a puzzling inquiry. どうして here means 'why / how come' rather than 'in what manner.' そんな is the medial demonstrative attributive ('that kind of, such a'), where そ- points to something contextually present in the conversation. The combined effect — 'how did she ever wind up thinking that?' — is a stock frame for expressing genuine bafflement at someone else's reasoning.