I think it's really just habit, established by D&D. I mean ... D&D was ridiculously popular and it established all sorts of conventions.
Furthermore, D&D inspired a ton of CRPGs and RPG-like games (such as roguelikes). In those games, there wasn't really a capability to replicate the role playing aspects of D&D, but it was straightforward to replicate the numerical mechanics, such as leveling up.
A lot of people were introduced to RPGs via these games first, rather than tabletop.