The Free Dictionary explains that during the bare-knuckle boxing match era a large circle was drawn on bare ground (called the “boxing ring”) to mark the area where the fight would occur. A line was scratched on the dirt in the middle of the ring. The fighters would indicate they were ready to fight when they stepped up to the line, or up to scratch. The expression evolved into meaning something is satisfactory or meets what is expected.