Why do African Americans have European first and last names?

In the past, black people were sold by white people. After being sold, for the sake of convenience, they were given names. Generally, the surname followed the owner. As for the name, it was usually whatever the name was for the officer, such as "Toasted bread", "sweet potato chips" and so on. Later, some slaves had a higher status and had a better relationship with their masters. They felt that these names were too insulting, so they gave them some nice names, mainly European names