Both “love your neighbor” and the Golden Rule are found in the Old Testament, but Jesus made it clear in the parable of the Good Samaritan that “neighbor” does not mean “the people just like me,” but “the person I least want to love.”
(When I said “out of line,” I meant “out of line with the expectations of His culture.”)
Being unclean or even associating with the unclean were anathema to the Jews. Being the "chosen people," they were to be and to remain clean.