How do you explain to kids that they need homeschooling to be away from bad influences? They want to stay in school.

Well.... If your child wants to stay in school, then they may be better off there. If they were being bullied or were not enjoying the experience, i'm sure they would jump at the chance to stay home. As far as bad influences are concerned, early education about drugs, alcohol and sex are the parents responsibility anyway, so be sure to inform your child about these dangers.
Bad influences? You can't keep your children from exposure to bad things. You can give strength to resist by your own example. Please forgive my frankness. I have colleagues who were homeschooled as kids by parents who wished to keep them scientifically illiterate or from making friends outside their faith communities. They resent this bitterly. Be wise ; if the kids want public school, be there for them.