They didn't have to, as there were no state grants or public research funds for mathematics during the 17th century.
Newton supported himself from his inheritance throughout the Great Plague, while he invented calculus, and then from flat salaries as teacher, then flat salaries from working at the London Mint. He later became fabulously wealthy after his appointment as Master of the Mint.
Leibniz was a diplomat, then a librarian.