Why? Why?

My 2 year old keeps hitting his head on the wall and he has a bruise on the forehead and I do everything to prevent it. He's so quick to do the minute I turn around. I can't watch him all the time. I don't know why he does it cause we give him attention all the time. Even when I am holding him, he gets up and hit his forehead on the wall.