The common answer for this is that it is a joke. He was singing that because he was singing a few bars. This is a wordplay on the word bar of soap, and also on the fact that bars in music are <span>a segment of time corresponding to a specific number of </span><span>beats, so it's a pun actually.</span>
When Jesus said "love your neighbor as yourself," his message was that you should treat people how you want to be treated. In other words don't steal if you don't want to be stolen from.