Does riot play favorites? No, no they don't. Riot plays priorities.
first of all just read this
http://na.leagueoflegends.com/en/news/game-updates/features/dev-blog-design-values-league-legends
Riot is a company and frankly nobody cares if a cool thing is a little underpowered unless people are just whining too much or overpowered but for the most part overpowered is a bigger issue than underpowered blahblahblah.
I don't know the exact formula but here's some stuff to consider.
First of all winrates. Lolking is not accurate, op.gg is probably even worse. Some sites have been known to be 1-10% off mkay? plus there's stuff like 5 hour games you can't factor out or whatever and afks. Riot can most likely do this.
Then there's things I like to call balance nightmares. The definition of this changes with riots design policy, the basics of this design policy can be found here on this possibly outdated dev article but it gives the basic idea.
http://na.leagueoflegends.com/en/news/game-updates/features/dev-blog-design-values-league-legends
champs that violate this don't have to be op to get nerfed OR buffed. champs that follow this may stay where they are even if they are underpowered
Look there are a lot of factors and stuff but I'm just going to shorten this by saying that Riot does not play favorites, Riot just has priorities based off a semicomplicated system of some sort that is constantly evolving. The only way to really understand this is to pay attention over an extended period of time and watch their patterns.
FOR EXAMPLE (prediction)
There will be ahri changes either direct or indirect, they will be perceived as nerfs whether they are nerf or even buffs. Ahri may get nerfed but she will be in great shape when world's comes for whatever reason. This has happened every year since season 2 where Morello once said something to the effect of "I wish we could see more mage duels in midlane like in ahri games instead of just watching them stall around" he said this as ahri's team defeated the undefeated kog/ori comp that had been dominating the tournament with slow paced boring strategy. And the fancult be like
https://i.ytimg.com/vi/L6hEyLmimZs/maxresdefault.jpg
#AhriFancultBanner
I don't love you all enough to do every champ but here's some notes on some semi-randomly selected champions and some terms you need to know
mage-assassins

once the only group explicitly balanced around risk/reward despite the constant regurgitation of the false quotes claiming riot HAS to balance everything around risk/reward. NO THEY DON'T. Seriously, check the Dev blog I link I provided, here it is again. Not saying riot cannot do this but they are not obligated to do so and likely don't consider risk/reward to be an actual priority.
So what is risk/reward and why/where is it important
The idea is that risk should reward you more. This does not have to be the case but this mostly goes refers to skillshots. The general rule is that risk is rewarded with cool effects and flexible options not power. This is something that seems to confuse people. Here's some champs where that applies, especially when the risk is missed skillshots or short ranged abilities on squishies.

these are all champs who get compensated in some way for skillshots or something else with cool and unique abilities or effects but they are not intended to be more powerful for this reason alone. This is not how balance in any game works.
Just because you play a "difficult" champ like

doesn't mean you deserve more damage and longer CC. If you enjoy the challenge then good for you, but there will be no compensation based purely on this.
Riot doesn't always nerf things it doesn't like
Riot has a very long list of things it is ready to shave off as soon as a particular champ that usually isn't a problem gets too strong or things they'd add if a champ got too weak.
Some examples of things in the past that have gotten too strong so they shaved off something
- His W was a long slow with attack speed reduction
long slows/permaslows - riot has never liked these hence why champs like
have always been treated a little weird. Older champs tend to get the shaft more than newer prototypes that will get slower changes like
These aren't OP they just violate the design principles and thus there is no right or wrong way to actually judge the kit but there is a right or wrong way to balance the kit.
- boring/suffocating playstyles
champs that suffocate the game or make for boring games for any reason will often go a longer time without changes or get randomly changed. They also do this to things that get tanky while running away. But tend to hesistate when assassins begin to do this because assassins tend to be very borderline as far as policy goes if you again look at the dev blog I linked, here it is again http://na.leagueoflegends.com/en/news/game-updates/features/dev-blog-design-values-league-legends
There is a whole lot more but I'll skip it for now and just get to one of the more controversial groups so to speak. BALANCE NIGHTMARES
there exists champs that may or may not be balanced but this game should probably not be balanced around them and the slightest changes to the game could put them out of whack if riot actually tries to manage them. But here's the catch.. some are individuals, some are groups.
singles

You'll notice that these are all champs who are likely to just get random goodies and reworks just whenever for whatever. And yes its a lot of champs, this game is not as "stable" as you might think but its also not as imbalanced as you might think either.
The following are the groups.. a bit harder to explain but basically if you nerf one it changes a bunch of others.
groups

I like to call these "the elite 4" This is the jungle group that was very strong during the 2 previous seasons. They are not necessarily OP or anything but they are a group that is used to balance the jungle with champions that do way too much. For example, if nidalee is too cool to be nerfed then to balance that out they need more things that fit that playstyle and offer counters to particular phases of that playstyle so they might go to the elite four and simply make the jungle meta stronger by working in favor of these 4. It was literally stated at one point that these 4 were avoiding nerfs simply because they helped to establish a healthier jungle meta just by being as they were while at the same time it was not necessarily the kind of meta they wanted in the future. But they simply would not nerf one without nerfing the others. Once these champs finally were nerfed and everything changed dark times came and champs from the singles group came into power briefly again explaining what sort of issue they pose

Next up is supports in general, these are literally champs designed to make other champs do things that would be too much to fit in one kit. A support plus anything else can do some weird stuff so they are balanced differently than others. But at the same time, if supports are too strong then bot lane goes into feast or famine mode, again violating the policy as mentioned repeatedly above. If supports are too weak.. well supports happen to poop on assassins and whenever supports are weak assassins become stronger. But at the same time riot is faced with a big challenge trying to make this role more attractive and fun. Doing this falls primarily under the meaningful choices category in the dev blog I linked you to
Here are the supports that need the strictest watch

some of you may wonder why I don't have stuff like
on here.. the other champs are on a different level from these simply annoying picks. They are extremes most supports will never reach. These 3 are able to be so troublesome ever because they are not on the strict watch list in the first place. Those on the strict watch list are champs that have abused their power far too hard for riot to ignore afterwards.
TL;DR
Riot does not play favorites, riot's priorities are just somewhat complicated but follow a somewhat predictable pattern or series of patterns that they are constantly touching on in numerous posts, especially ones like this design blog again
http://na.leagueoflegends.com/en/news/game-updates/features/dev-blog-design-values-league-legends