Doctor Faustus is a morality play in that it warns us against the dangers of behaving in a certain way. To be more specific, it warns us again playing God. To that extent, it is didactic; it has a teaching function beyond merely providing entertainment.
Marlowe wrote his masterpiece at a time when increased scientific knowledge opened up more and more of a world that had previously seemed so mysterious. For many, it seemed that there were no limits to how much man could know about the world around him. What had been mysterious could now be unlocked using the magic key of science.
With growing confidence in man's capacity for knowledge inevitably went a certain arrogance, and it's precisely such an attitude that's displayed by the eponymous Doctor Faustus and which Marlowe subjects to a withering critique. Faustus is profoundly dissatisfied with the relatively limited knowledge he's gained through his studies. He wants to know more, and with the extra knowledge he hopes to gain, he also wants more power. That's why he enters into a shabby bargain in which he sells his soul to the Devil. In doing so, Faustus is openly defying God, which in those days was considered the ultimate sin.
Whatever power, prestige, and knowledge Faustus has gained from this devil's bargain, it's come with a very high price tag: he's lost his mortal soul and will spend the rest of eternity in hell. The moral of the story is clear: no matter how important we think we are, we're never more important than God and should not try to act like him.