Kind of deep question.
I'll try and explain simply.
There is eight things humans will do in heaven forever (without being bored) - know and love God, angels, each other, and ourselves - forever we do this, we do this by 'peeling layer after layer' like an onion learning more and more deeply about each of the four. Now, angels do the same thing, but in the hierarchy, which is Heaven, they are below man.
Angels have more powerful minds and wills than man (this is compared to the weak mind and will of man on earth, not our regenerated bodies in heaven), but their rank is absolutely vertical and always below man's rank in Heaven. They were created to serve man and this upset some of the angels (about 1/3 of them), as even though they were created with a more powerful mind and will and they were created before us they were our servants.
Now, Lucifer was the numbero uno angel. Meaning his mind and his will was most powerful, second only to God himself (though a distant second). God created the angel Lucifer to know and love God more deeply and thoroughly than any other creature created. He was one of the angels in the first choir (maybe even made up a choir of just himself) that was filled with fire (this has nothing to do with hell, or the phenomena of fire that we know, this is filled with the passion for God so fierce that it beats the worst kind earthly addictions). His purpose was to know the mind of God.
Simple answer: God created Lucifer to know His mind and to be the highest servant of man.