I know that GB unilaterally decided to end the trans-atlantic slave trade, and prevent future expansion into South America (the USA also forbade such expansion but lacked the capacity to enforce it) going so far as to patrol the coast of West Africa. But I never heard about why except as a moral decision. So, what if any were the motivations besides ethical?
The primary motivation was ethical. Slavery was still profitable in the late 18th and early 19th centuries in the British Caribbean and British ships dominated the trans-Atlantic slave trade. A decades-long campaign by William Wilberforce and others eventually won the balance of MPs in the houses of parliament over to the side of abolition despite howls of protest from plantation owners in the Caribbean.
The slave trade was abolished by act of parliament in 1807. Among the causes was to prohibit the transportation of slaves to colonies of Britain's European enemies during the Napoleonic wars, but chiefly it was the culmination of a moral campaign. Parliamentary reforms also helped. In 1801 the act of union which brought Ireland and Britain together as the United Kingdom added 100 Irish MPs to Westminister, most of whom favoured abolition. The Royal Navy created the West Africa Squadron, nicknamed the sentimental squadron, to stop as best they could at considerable expense in treasure and lives, the operation of the slave factories.
As for general abolition, that came years later in 1833. Arguably the proximate cause was the Baptist War, wherein a Samuel Sharpe led a slave uprising in Jamaica. The British suppressed it, and held an inquiry which when published revealed the depravity of the Caribbean plantations. This intersected with the rise of a sugar beet industry which helped lessen the potential impact of declines in sugar cane production in the Caribbean. Overwhelmingly though, the arguments made were moral ones and I think its fair to say that was the primary reason it was abolished.