RPGs based a lot of their in-game mechanics (Damage calculations, leveling up, in-game findings, random creature encounters) from table-top games like D&D and Pathfinder. Now they're just a lot more complicated in RPGs now to where they need programmers to ensure that the correct data is processed and accurately reflected in the game.
Strategy games base of a lot of stuff from the oldest table-top game known to man, Chess. Starcraft for example, is all about strategically managing your resources, like minerals and your army, just like how Chess is. You manage your pieces on the board and find ways to checkmate your opponent.