Consider these examples:
- Saudi Arabia.
- The so-called Islamic State.
All of these governmental entities (because Daesh isn't recognised by any nation) are rated by Amnesty International to have abysmal human rights records.
Amnesty International says that in Saudi Arabia, there were over 150 executions, summary judgements are routinely issued, thousands of people have been expelled from the country to dangerous areas, there is government discrimination against Shia muslims, and there are severe restrictions on basic freedoms. The West still buys oil from them.
The so-called Islamic State is famous for its violations of human rights. But until recently, with the advance of the Iraqi army and more effective coalition airstrikes, Daesh was earning millions of dollars a day in smuggling oil at below-market-prices, selling it to tankers which would then cross the border into Turkey. So oil was and still is being bought from them.
Venezuela has also committed some human rights violations as well, imprisoning journalists which have spoken up against the regime, killing political opponents, etc. Until very recently, with the near collapse of their oil infrastructure, the West bought huge amounts of oil from them as well.
In general, people are willing to overlook human rights abuses if a country is willing to provide a cheap and dependable supply of a vital natural resource. Countries need petrol to fuel their cars, ships, military, etc. Democracies face electoral unrest if oil prices rise too high (even though it is preposterous to blame a national government for the movement of the global petrol market). Unfortunately, the human rights of people far away don't really matter that much when countries don't need to see or hear of them.