As Brendon mentioned below, the actual value of 540 RPM was a result of a consensus agreement and the difficulty getting one of those is about the same difficulty as herding cats.
The first PTOs were for mowers, grain binders, and similar equipment that utilized sickle bar cutters for which operating speeds were in the 500-600 RPM range for the average traveling speeds at that time.
The initial push for standardization of this feature was made in the 1920's by the Farm Equipment Institute (now part of the Association of Equipment Manufacturers) because of the variances in diameters, spline details, locations, and speeds of PTOs. There was a desire to try to standardize PTO details so implements and tractors could be interchanged more easily. (A study in 1929 of 35 popular tractors showed PTO speeds varying from 515 to 745 RPM.)
The original draft of the standard made by the FEI was adapted by ASAE (American Society of Agricultural Engineers, now called ASABE) in April 1927 and specified a 1 3/8" shaft, 6 splines, clockwise rotation, and 536 +/- 10 RPM, located on the centerline of the tractor, and was to be 14" ahead of the drawbar pinhole. By 1958, the standard had been rounded off to 540 RPM.
By the way, this standard (ASAE S203) was their longest-running and was only discontinued in 2011 since a similar world-wide ISO standard was adapted by ASABE.
Although ASAE S203 was adapted in 1927, it wasn't mandatory and not all tractor manufacturers changed their configurations at that time. John Deere, for example, in Field Service Bulletin 148-S dated 15 June 1944, introduces a number of "bundles" of available parts to modify tractors built earlier to make them compatible with ASAE standards.