To answer the question given in the title, classical names were given by masters to slaves from the very beginning of the slave trade. Beginning in the 1960s this was seen as a degrading history which led some African-Americans to change their names away from classical names. Although Muhammad Ali himself got his classical name from an abolitionist, it is true that classical names were often given for degrading reasons. Remarking on this awareness in 1977, a historian wrote:
If, as has often been suggested, owners frequently bestowed classical names upon slaves, their near absence at the emancipation would mean that significant numbers of blacks rejected such public designations ...
Herbert George Gutman. The Black family in slavery and freedom, 1750-1925. Pantheon Books, 1976.
(Other writers dispute how common such rejections were in the 19th century.)
In any case, here is a full history of the practice. (Copied from another question which I regard as very similar, though that question involves other aspects of naming)
Classical names abound in eighteenth-century slave records. Even though slaves were not, as a rule, given new namess until sold to their new owners, the few instances of slave traders or sailors naming their cargo before they even reached America indicate that these chained Africans were dubbed Caesar, Nero, or Pluto, or, as the first two names on one list of cargo, Primus and Secundus.
Inscoe, John C. “Carolina Slave Names: An Index to Acculturation.” The Journal of Southern History, vol. 49, no. 4, 1983.
These names originated from a peculiar kind of Southern wit. It is well-known among Southerners even today that the names of classical heroes were given to slaves as an ironic insult to their status as slaves. It also had the purpose of demonstrating to visitors the plantation owner's own learning.
Southerners prided themselves on their knowledge and appreciation of Græco-Roman civilization and often stressed the many similarities between it and their own society, not the least of which was the institution of slavery.
Occasionally a name insulted the specific personality of the slave, but more often it created a vague Classical aura which gradually lost its degrading tone.
All but one of eight slaves named in William Yeates's 1751 will were named for Roman gods or heroes. The names of almost a third of South Carolina runaway slaves [...] were of Greek or Roman origin [...] there seems to have been little correlation between the original ancient figure and his black namesake, except for an occasional dim-witted male slave named Plato or Socrates or a sexually promiscuous girl named Venus or Aphrodite. Thus, the intent of the owner in bestowing these names would have been too subtle or tenuous for the slave to have detected anything insulting about them. Nor can one assume that all of these names were first applied by masters for satiric or condescending reasons, particularly once the practice became commonplace.
The practice of having masters name slaves was widespread throughout the South.
Slave children, in fact, were often, if not usually, actually named by the master or mistress. [..] Classical names, although less numerous than certain writers on plantation life would have us think, also probably reveal the hand of
the master class. Our slave list includes the following: Achilles,
Augustus, Bachus, Brutus, Calypso, Cassius, Cicero [...] Scylla, Silla, Siller, Sylla.
Puckett, "Names of American Negro Slaves," in Murdock, ed., Studies in the Science of Society (New Haven, 1937), pp. 471-494.
This 1937 source claims elsewhere that classical names were also common in the white population, but this is not born out by census data.
Like place-names and day-names, classical names were rarely found among the slaveholders. These names were associated almost exclusively with slaves. Prior to 1800, classical names accounted for about 20 percent of names given to male slaves born on the Ball plantation. During the nineteenth century, the share of classical names declined to about 10 percent.
Cody, Cheryll Ann. “There Was No ‘Absalom’ on the Ball Plantations: Slave-Naming Practices in the South Carolina Low Country, 1720-1865.” The American Historical Review, vol. 92, no. 3, 1987, pp. 563–596.
Ulysses S. Grant (né Hiram Ulysses Grant) was born in Ohio to an originally Puritan family who probably had different ideas about naming; the 1937 source observes that the prominence of the name Ulysses probably derives from him, not from antebellum names.
20th century historians remark on the classical interests of slave owners, but 21st century historians have been unable to avoid noticing the inherent cruelty in assigning someone a name that serves as a source of fun. They also observe that the names tend to play on skin color, either through reference to ancient Africans, or through juxtaposition.
"Such names functioned as cruel jokes: for instance, Scipio, a common male slave name, referred to the Roman general Publius Cornelius Scipio Africanus, whose agnomen, Africanus, meant “the African,” in praise of his triumphs in battle in North Africa." (Abel, Tyson, and Palsson, 2019. "From Enslavement to Emancipation: Naming Practices in the Danish West Indies." Comparative Studies in Society and History, 61(2), pp.332-365.)
"Such names served to reinforce the idea of Africans as embodiments of exotic alterity, but also invited pointed comparison between the appearance and circumstances of the slave and the illustrious personage referenced by his name. These were names to call as a joke, names whose grandiosity humiliated: Ignatius Sancho, Gustavus Vassa,
Julius Soubise." (Susan Benson, "Injurious names: naming, disavowal, and recuperation in contexts of slavery and emancipation." Vom Bruck and Barbara Bodenhorn, eds. The anthropology of names and naming. Cambridge: Cambridge University Press, 2006.)
"[The literate slave trader] chose not to speak of Venus, the other dead girl. The pet name licensed debauchery and made it sound agreeable." (Saidiya Hartman, Lose your mother: A journey along the Atlantic slave route. Macmillan, 2008.)