Projection can be learned behaviour. If as children our parents or guardians projected their feelings onto others we can assume this is just what one does.
Most often we project onto others because we have such a backlog of repressed emotions we are ashamed of, we are unconsciously driven to unload them elsewhere in an attempt to feel better.
But how does one end up with so many repressed emotions? You might have had a parent who was not fully available to you in your important early years, so you learned that it was best to hide certain emotions that made your parent or guardian even less likely to give you the attention you needed (for more on this read about attachment theory).