Loneliness and boredom are good ingredients as well. Some physical isolation helps with that. I lived in a neighbourhood where I was the only kid. That made me bored frequently and drove me to habits that still serve me well.