Lyxen
Great Old One
Well, if by playing a role one means having a particular suite of capabilities to bring to bear on the ingame situation, then classic D&D promotes playing a role through its relatively tight class system. This is what Gygax points to on p 18 of his PHB.
This conception of playing a role is reinforced by other passages in the PHB and DMG, though these are a bit half-baked. The PHB entry on Experience (p 106) identifies "aims" for each class, and says, "If characters gain treasure by pursuit of their major aims, then they are generally entitled to a full share of earned experience points awarded by the DM." The DMG does not develop this notion, but instead (p 86) has a rule for training time (and hence amount of expenditure required) to gain a level: that time is based on a the DM's rating of the player's play, having regard (to among other matters) whether the player "perform[ed] basically in the character of his or her class".
This is very different from characterising a PC. Page 86 of Gygax's DMG does mention another factor - "Were his or her actions in keeping with his or her professed alignment?" - but I think that is much more about limits on behaviour that flow from being lawful and/or good rather than presenting a fully-realised character.
But while different from characterising a PC, it is the playing of a role.
You are forgetting the section on page 7 of the PH, or is it something that you call "half-baked" ?
As a role player, you become Falstaff the fighter. You know how strong, intelligent, wise, healthy, dexterous and, relatively speaking, how commanding a personality you have. Details as to your appearance, your body proportions, and your history can be produced by you or the Dungeon Master. You act out the game as this character, staying within your “god-given abilities”, and as molded by your philosophical and moral ethics (called alignment). You interact with your fellow role players, not as Jim and Bob and Mary who work at the office together, but as Falstaff the fighter, Angore the cleric, and Filmar, the mistress of magic! The Dungeon Master will act the parts of “everyone else”, and will present to you a variety of new characters to talk with, drink with, gamble with, adventure with, and often fight with! Each of you will become an artful thespian as time goes by — and you will acquire gold, magic items, and great renown as you become Falstaff the Invincible!
So why I agree that there is that aspect of "playing a role in the party" according to class, there is also the part about acting in character, and this is reinforced by the descriptions from the modules that I have also provided.
The loosening of class boundaries in 3E and 5e D&D reduces the scope to play a role in this sense, I think.
The notion of party role was heavily reinforced in 4e, though, so it's not a general trend, more like specificities of editions, the way I see it.