The rules for construct price say:
As a rough guideline, a construct’s price is equal to its challenge rating squared, then multiplied by 500 gp. Constructs with a fractional CR rating base their price on that fraction of 500 gp.
And:
The first special ability is included in the construct’s base cost. The next two special abilities increase the calculated price by +1/2 CR per ability. Thereafter, any additional special abilities add +1 CR per ability.
The Clockwork Soldier has four special abilities: efficient winding, proficient, standby, and latch. This gives it a CR boost of 2 for the purposes of cost. In addition, it has a Strength of 28, which is higher than most other CR 6 monsters, which can count as a special ability for the construct price rules. This gives us a total of CR 9 for pricing. CR 9 constructs cost 40500 gp, according to the formula. 40500 is a bit higher than the listed 37000 listed, but it might be adjusted down due to other factors.
Alternately, not counting the high Strength, a CR 8 construct costs 32000 gp, according to the construct price rules. This is a few thousand lower that the 37000 listed, but it's decently close.