I agree it seems strange. R2 droids are specifically engineered to work on starfighters
this rounded, waist-high droid was made specifically to fit in military starfighter astromech slots
However, it probably retains the general purpose of an astromech droid:
a type of droid that served as an automated mechanic, performing a variety of repair duties
which means it would be handy to have around in a semi industrialized agricultural environment. We also see that R2 series is very high quality.
So this is a bit like buying the highest quality Swiss Army Knife -- sure it's engineered for military use, but it is handy in many other situations. Or maybe imagine buying a Humvee -- could be handy for some kinds of rural work.
Update: as @SQB pointed out above, Owen originally went for an R5 unit, which is the low cost budget version of the R2. Perhaps he gravitated to the R5 first out of frugal farmer instincts, but R2D2 (as a used unit) was a tolerable price.