The basis of D&D is hack and slash and has been since it grew out of tactical wargaming 30 years ago. The system is overwhelmingly focused on combat, to the extent that character growth is reliant on killing lots of monsters and lists of things to kill make the most popular supplements. Character generation still consists mainly of choosing a generic orc-whackin' action figure (preferably with fully-munchkined stats) with which to go forth and do battle; the very idea of an effective non-combat character is ludicrous.Huh? I totally disagree, there is PLENTY of roleplaying opportunity and it's up to the DM and players to make that happen. We've had sessions where the entire 5 or 6 hour time was spent talking with NPCs, playing our characters' personalities, and such. What IS an RPG then, if D&D isn't?
D&D isn't really an RPG, it's a paper video game with roleplaying crudely bolted on the ass like an aftermarket wing on a Honda.
Simply put, any roleplaying you do while playing D&D isn't because of the rules, which do nothing to support or encourage it; it is despite them.
Many other RPGs offer more flexibility in character design and play style.