"I'm doing everything I can - everything i know to do, and the kids are still driving me crazy!"
"I cant believe she would do something like that. She's always been one of my good kids!"
"Didn't they learn how to _______ properly in ____ grade?"
What you believe about the nature of your students is important because it sets the stage for your expectations of their current and future behavior. I tend to experience this the most in my classroom when comparing upper-level courses like AP Stats to lower courses like Algebra or Geometry. Your students may be more or less mature and more or less nice than others, what ultimately, do you allow yourself to be surprised when they don't meet your expectations, or is it something you expect from all of your students to sometimes happen?
If you're a Christian, this is a case where your beliefs should rule your teaching more than just being "nicest," "most honest," or "showing love." You must remember that your classroom is composed of students with a sin nature that cannot help but follow their heart's desire for selfishness.
 And you were dead in the trespasses and sins  in which you once walked, following the course of this world, following the prince of the power of the air, the spirit that is now at work in the sons of disobedience— among whom we all once lived in the passions of our flesh, carrying out the desires of the body and the mind, and were by nature children of wrath, like the rest of mankind. (Ephesians 2:1-3 ESV)
You can have the best behavior management strategies, relationships with kids, tightly scheduled transitions, and you'll still have students that resist you and try to cause trouble. Its not a matter of you (or the students) trying harder, its a matter of students being changed by the grace of God in Jesus.
WHAT'S MY RESPONSE?
1. Expect that students will let you down.
I like this quote from a sermon on Ephesians 2 from 20th century English preacher Martyn Lloyd-Jones:
Believing as we do this biblical doctrine of man in sin, we should never be surprised at what happens in the world. Are you surprised at all the murders, the thefts, the violence, the robbery, all the lying and the hatred, all the carnality, the sexuality? Does it surprise you as you look at your newspapers? It should not do so if you are a Christian. You should expect it. Man in sin of necessity behaves like that. He cannot help himself; he lives, he walks in trespasses and sins. He does it individually; he does it in groups. - excerpt from "The Christian Message to the World", God's Way of Reconciliation
2. Maintain high expectations for discipline and behavior.
You might be the only person in their lives that expects as much.
3. Structure opportunities for students to make up for mistakes they've made.
If your students don't feel like they can recover your trust or favor after a bad day, you're more likely to lose them behaviorally AND academically.
4. Forgive, forgive, forgive. (And apologize when it's your turn).
That isn't to say that actions should not have consequces - quite the contrary, but consequences should be related to the day's behavior, not the accumulation of 2 weeks, and you have to be willing to set it aside the next day.
This is probably the hardest one, but also, probably the most important.
5. Always be prepare to retrain and review procedures and expectations.
This is not only good for students to be reminded of what you expect from them and they should expect of each other, but it will probably also help you reflect on areas you may have been lax recently.
Those little darlings that walked in quiet, straight lines in elementary school are still down there. Somewhere. :)
6. Pray for your students. (And receive prayer for yourself)
As I started with - the only thing we can hope to truly change our students and our classrooms is the regeneration of our spirits through Jesus.
I think the best answer to the question, "Mr. Baker, how do you PUT UP with these kids," is, "Prayer."
The further you become like Jesus, the easier loving your students and caring for them will be, but also always be aware of your own potential to let them down with an angry remark or harsh response.
7. Love them.
All the time. Not when they do something good. Not when they're finally on time for consecutive days. Not when they finally do their homework. All the time.