We should not forget that Pierre de Fermat was dubbed the "prince of amateurs", notably by Eric Temple Bell in his 1937 book Men of Mathematics—a description that seems hard to fathom in view of Fermat's achievements. Yet he really was someone who loved and "practised" mathematics but whose profession had no connection with the subject: Fermat was primarily a magistrate at the Parlement of Toulouse. His scientific activity and extensive correspondence with the scholars of his day lay entirely outside his parliamentary duties.

Pierre de Fermat (early 17th century–1665).

Mathematics: a pastime for the privileged? ---------------------------------------------------
Without going all the way back to antiquity, from the 13th century onward few mathematicians could be described as professionals: university teachers were very scarce, and researchers scarcer still! In practice, anyone wishing to pursue mathematics needed an occupation that left some free time. This meant that such people—mainly men—belonged to a privileged class. Alternatively, they had to belong to the nobility or, more generally, the aristocracy: these positions gave them time to devote to scientific research without having to worry about earning a living!