It's common for games to have multiple overlapping loops of gameplay and reward, hitting different frequencies and motivation types, so that we don't have all our eggs in one basket, motivationally speaking. This helps the game appeal to more players, and more consistently appeal to any one player, since every player is a multifaceted human being with a variety of interests & needs.
RPGs typically scratch the "variable ratio" itch with combat and loot drops. You have a random chance of encountering this mob or that mob, a random degree of success on attacks and dodges, and a random reward on completion. Unknown rewards in chests and breakables found as you progress through the world function similarly.
This forms a very high-frequency loop every few minutes of gameplay, making it well suited to produce a feeling of "just one more fight!" - a good loot roll could be just around the corner, and it only takes a few minutes more to try another time.
XP and leveling progression serve a different niche, on a longer term - ensuring the player can see they're making measurable progress and growth over hours of gameplay, or from one game session to the next. Even if I get a terrible sequence of loot rolls and am nowhere closer to crafting that shiny new item, hey, at least I'm 1000 XP closer to my next level, so I'm still being productive and haven't wasted my time!
Because of the longer timescale of leveling, a random chance isn't quite so motivating here. I don't want to sink another hour of play just for a chance I might level up. For an investment that large, a player will typically want some predictability. Even if I don't manage to hit level n+1 today, knowing I'm just 500 XP away makes me eager to come back and finish the level tomorrow, opening up a new long-term goal of hitting n+2...
So, it's not that these games forego variable ratio rewards, they're just choosy about where they deploy them.
Player expectations are a factor here too - players have a lot of experience with random loot drops and predictable XP progression at this point, so sticking to this convention helps the players feel comfortable, and learn the systems efficiently. Suddenly making level progression randomized risks alienating players, so it's often safer to place those variable ratios elsewhere in the game design.
This expectation might be a factor in why RPGs that have decided to use variable ratio rewards as their long term progression — eg. Destiny and other games with high-end leveling based on gear score — have chosen to do so via the loot system, to better match where players are used to seeing this type of randomness. They could as easily have given out a "level token" randomly, but by attaching leveling to the quality of gear that drops, they piggyback on a familiar gameplay pattern of loot grinding, and also give more interest to the "failed" rolls. (ie. Gear that doesn't increase your net level might still be useful to sell, use in crafting, or have some other value like a special ability useful in some circumstances, or a desirable visual appearance)