。
She cut the cake in two.
Literal
She [topic-は] cake [object-を] two [into-に] cut.
The に here marks the result of the cutting — '[cut] into two pieces.' This 'turn X into Y' use of に shows up wherever an action transforms an object into something with a new shape, role, or category: 半分に切る (cut in half), 三つに分ける (split into three), 大人になる (become an adult). 二つ uses the native Japanese counting form (ひとつ, ふたつ, みっつ...) which is used for general small quantities and pieces, distinct from the Sino-Japanese 二つ pronounced 'にこ' which doesn't exist — these native counters are read with a different number system (ふたつ, here).