I think it's largely for historical reasons.
A Unix file descriptor is a small int
value, returned by functions like open
and creat
, and passed to read
, write
, close
, and so forth.
At least in early versions of Unix, a file descriptor was simply an index into a fixed-size per-process array of structures, where each structure contains information about an open file. If I recall correctly, some early systems limited the size of this table to 20 or so.
More modern systems have higher limits, but have kept the same general scheme, largely out of inertia.