Some common and traditional simple-fraction model-scales are 1/12 and multiples thereof. Given that 12 inches to the foot was very common in pre-metric length measurement systems in Europe (10 inches to the foot and 11 inches to the foot were used, but 12 inches to the foot was common (10 inches to the foot was standard in East Asia)), this gives the simple 1 inch (model) = 1 foot (life-size). For many purposes, this would give result in inconveniently large models, so multiples of 1/12 are common. 1/24 is common for model cars, 1/48 for model aircraft, 1/72 for many military miniatures, especially wargaming miniatures (a figure representing a 6 foot human is 1" tall), 1/96 is common for model ships. These are, respectively, 1" = 1 foot, 1" = 2 feet, 1" = 4 feet, 1" = 6 feet, and 1" = 8 feet. Having what might at first glance be inconvenient fractions works well with the non-decimal 12 inches to the foot.
HO (1/87) has a different ancestry: model railways. Model railway modellers benefit from standardisation, since they can buy engines and rolling stock from multiple manufacturers. If smaller manufacturers want to be among the number that modellers buy from frequently, they must use the same scales as the bigger manufacturers. Thus, informal standardisation arises. Formal standards exist, too - national modeller organisations such as the NMRA publish standards, and manufacturers conform: https://www.nmra.org/index-nmra-standards-and-recommended-practices
The origin for HO is the old 0, 1, 2, and 3 scales, which used 1.25", 1.75", 2.5", and 3.5" as their track gauges. The smaller scales sold better - cheaper, and "larger" layouts could fit into a given space. This led to the introduction of scales smaller than 0: 00 and H0 (originally with a zero, but became HO in some countries), and the battle of the small railway scales was on! 00 (1:76) won in Britain, H0 (1/87) in the rest of Europe, and HO (1:87.1) in North America. The modern standards are metric, with H0 and HO both using 16.5mm gauge track. The British cheat, and use 16.5mm track for 00 as well (standard gauge should be almost 19mm at 1:76).
That's the simple version only - the full picture is much more diverse. In the real-world railway world, not everybody uses standard gauge (originally, and still in the USA, 4 feet, 8.5", and 1.435m in the modern metric standard). Model narrow-gauge and wide-gauge railways need tracks at other than 16.5mm to be compatible with H0/HO, while retaining the 1/87 scale. Also, while H0/HO/00 are common, there are other scales in use.
The miniature wargaming world is diverse, too. Cost and the desire for large-scale battles with huge numbers of figures drive things to small scales, and the desire to actually paint the figures without too much eyestrain and to have other people see them drives larger scales. 25mm (named after 6' human height; this is 1/72) is common, but 15mm (which is approximately 1/100) is also common. Gaming modern warfare, with large battlefields, has made 10mm and 6mm common; 6mm is common for armoured warfare (and is 1/300 in Europe and 1/285 in the USA). Miniatures for table-top role-playing games (RPGs) are related, but the RPG figures are often a little bigger, with the RPG version of 15mm often being about 18mm, and the RPG 25mm being often 28mm - for more heroic heroes and more monstrous monsters.