The tax horsepower rating was based on a pure mathematical formula based on cylinder dimensions.
The British system was based on the RAC horsepower rating which only included total piston area. To optimize engine size and decrease the tax rating, typical British cars developed engines of very long stroke and low cylinder area for a given swept volume. That tradition continued long after the tax horsepower was abolished.
The tax horsepower rating was often used as the car model name. The Citroën 2CV (two horsepower) was the car that kept such a name for the longest time.
At a very early stage the tax power was reasonably close to real power. As the development of the internal combustion engine continued, real power overtook the tax rating by a factor of ten or more.