。
She went there to swim.
Literal
She [topic-は] swim [in order to-ために] there [to-へ] went.
そこ ('there') is one of the こ・そ・あ demonstrative series — それ for things, そこ for places, そちら for directions. The ~ために on the dictionary form 泳ぐ marks deliberate purpose: 'in order to X / for the purpose of X.' へ marks the destination of motion (vs. に which can also mark direction but with subtly different connotations — に is more neutral about the endpoint, へ emphasizes the direction of travel). A textbook-clean purposive movement sentence.