Improperly baked beans
an inflated ego is caused by a lot of praise.. and lack of constructive critisism... which leads to one only seeing good things about themself and overlook faults and mistakes..
pride in my opinion have 2 sides.. positive pride is when you have achieved something and feel proud and it makes people who love you happy (as SeventiesRock mentioned).. in addition.. it is also when you don't stoop low and have enough self respect not to do wrong things or sell your manners and ethics for cheap prices..
the negative side is when you are too proud and begin to see yourself much better than others.. and put yourself in a higher grade than others and then your ego is inflated and you never admit to your mistakes.. or help others (because you think it is beyond you to go down and lend a helping hand) you become arrogant and you slowly lose everyone who loves you!
I think an inflated ego is really low self esteem and insecurity. Those that are truly in touch with who they are and are aware human beings know that we are all equal. It is great to feel pride and good about ourselves but sometimes ego leads to narrow minds and judgement. I think it is a strong moral compass that you follow leads to Pride.
The short answer to this is......
You do.....You allow it.