The wheels were part of the mechanical advantage, the “gearing” if you will. Passenger locomotives, designed for high speeds had the large wheels. Big wheels, more track covered with one revolution. Freight locomotives, designed to pull heavy loads more slowly, had smaller wheels.