Back in the "olden days" reservations systems (both air and rail) were limited to the purchas of 4 or 7 seats at a time because they used either 2 or 3 bits for the quantity field.  Today, that limitation is removed but no airline will generally allow an agent to sell more than 9 at a time.  I have seen limits of 4, 7 and 9 today on the res systems.The airlines themselves can sell whatever they want.  Most airlines maintain control over sales of 10 or more seats because they consider it to be a "group" and subject to different rules and procedures.
As to the 5, that is probably a holdover as well as train seat sales are little different than air seat sales.  And there may be some administrative reason for the limitation as well.  Why 5 instead of 4 or 7?  Dunno.