It was explained in this conversation:
Sam Winchester: But after, we're gonna meet up, right? Use the gun together, right?
Sam Winchester: You're leaving again, aren't you? You still wanna go after the demon alone? You know, I don't get you. You can't treat us like this.
John Winchester: Like what?
Sam Winchester: Like children!
John Winchester: You are my children. I'm tryin' to keep you safe.
Dean Winchester: Dad, all due respect but uh, that's a bunch of crap.
[Sam and John look at him in surprise]
John Winchester: Excuse me?
Dean Winchester: You know what Sammy and I have been huntin'. Hell, you sent us on a few huntin' trips yourself. I mean you can't be that worried about keepin' us safe.
John Winchester: It's not the same thing, Dean.
Dean Winchester: Then what is it? Why do you want us outta the big fight?
John Winchester: This demon? It's a bad sonofabitch. I can't make the same moves if I'm worried about keepin' you alive.
Dean Winchester: You mean you can't be as reckless.
John Winchester: Look. I don't expect to make it outta this fight in one piece. Your mother's death? It almost killed me. I can't watch my children die too. I won't.
Dean Winchester: What happens if you die? Dad, what happens if you die and we could've done something about it? You know I been thinkin', I think maybe Sammy's right about this one, I think we should do this together. We're stronger as a family, Dad, we just are, you know it.
John Winchester: We're runnin' outta time. You do your job and you get outta the area. That's an order.
Source: Quotes for John Winchester
So, there are basically two reasons, both closely related to his sons:
His own efficiency, as they get him distracted, for he goes after a dangerous daemon (the yellow-eyed one), and thus worries about them getting killed.
He is afraid to actually see them die, like he saw their mother die.