Do teachers show favoritism during grading?
Here's a secret: No grading is 100% objective. Even when grading something seemingly concrete, like a math test or a language-class verb test, my grades could look different from someone else's for the same exact test. How? Maybe I count 2 points per verb, but another teacher counts 3. Maybe a math teacher takes off points for not showing work, but his colleague does not. I've participated in experiments in which we teachers make photocopies of student work and then exchange them to grade. While they often come out similar, they're never 100% identical.
Now, when it comes to grading something more open-ended like an essay or research paper, it gets even more tricky. Some teachers care very much about grammar, writing mechanics, etc. Some care less. What about the kid with a learning disability who has great ideas, but struggles to express them? What about the immigrant or international student who simply hasn't had the exposure to your native language that you have? This is much harder. Teachers vary considerably on this, and struggle a lot. Why is one paper worth a B, but the next one a B+?
I think your question implies that teachers may give better grades to students they like. Sure, this can happen. Teachers are human beings. In my personal experience, though, the students who enjoy my class, or are strong language learners get better grades because they work harder or it's just easier for them. And in class, they often ask interesting questions or get an answer right that the others don't. It may look like I prefer these students, but what you're really seeing is me meeting them where they are, at a higher level.
Like all human beings, I like some people more than others. But please know that a student's ability is rarely why I like him/her. Some of my favorites over the years have been the ones who've struggled the most. Or have made me laugh. Or have opened up to me. What you don't see in class is the student meeting with me to get extra help. Or the email exchanges I have with the parents to try to figure out what's going on with their child. So-at least in my case-please don't assume that student X gets an A because I like her better. It's much more complicated than that.
Of course, every teacher is different; this is just my experience.