use joystick like a potentiometer for windows motor

Hi, i have this question, because i have to do the program for control a motor window just using a joystick like a potentiometer, but why make to converting joystick for potentiometer in programming. I dont no why have to do for this?