Why does Genesis 2:19 suddenly switch back to the creation story?

It does not. It spends a grand total of one verse describing God’s creative activity again. God is seeking a “help meet” for Adam, while killing two birds with one stone by inviting him to name the animals. Of course, none of the animals will do the job: “there was not found an help meet for him” (Gen 2:20) among the animals he named.