They have been investing A LOT of money on the last years to portray themselves as an European country. That's why there is a F1 race there, as well as the European games last year, Lady Gaga, Mariah Carey doing performances, among a lot of new buildings and the boulevard in Baku.
Petrolium lost a lot of value on the market, their money lost a lot of currency value as well, but it looks like they still have loads of money to invest on this.
I cannot argue about corruption and homophobia, but the most? Maybe Top 20. I can think of worst places on Earth. They do try to portray a good image, so I don't blame Mariah for going there. It is not blatantly bad like performing for African dictators.
It is a bit less bad