Why do people act like know it all?

Why do people act like know it all?

Most know-it-alls have a poor self-image. They have to one-up others because that makes them feel better about themselves, it shows that they are smart. Except that it doesn't, but that's the way the thinking goes. People with a very good self-image do not feel the need to prove themselves.