Why did the US and UN send troops when North Korea attacked South Korea?

to create an alliance
to protect colonial interests
to follow the containment policy
to create a demilitarized zone