Why is there western and American Samoa?

It used to be one whole country. Samoa. Until world war I when the US occupied American Samoa for its naval base in Pago Pago, and Western Samoa was occupied by Germany, and then NZ. Now, Samoa (no longer called Western Samoa) is an independent country, whereas American Samoa is still a US territory (but is governed by Samoan representatives and a Samoan Governor). So now there is American Samoa and Samoa.