A quarter-wave vertical over a lossless ground plane would be around 36 ohms.

A lossless ground plane is highly unlikely whether using on-ground ground radials or elevated ground radials. The additional ground loss adds to the 36 ohms value, though again, if assuming a quarter-wave vertical radiator.

The "ideal" 36-ohms number can change considerably for added loading coils to shorten the vertical radiator, capacitive coupling, and various other potential system losses.

I suspect the 40-ohm default value is assuming more like a 20-ohm radiator with an additional 20-ohms of ground loss. You can model the antenna to get a better idea, but for simplicity's sake, the 40-ohm value is a generic enough ballpark starting point for a basic short vertical antenna design IMO.

Vertical radiator length, radial lengths, loading, capacity hat sizing (if present), feedpoint matching, etc. can be be tweaked once deployed to change system resistance if needed.