there's no direct relationship between orbital period and length of day.
If we treat Earth's orbit as a perfect circle, then the number of milliseconds in a year would be its circumference. To get to pi then, we just need to divide that by its diameter or 2*its radius. In addition, we have the circumference in ms so we want to convert that into a distance or the radius into ms so we need the speed the Earth is rotating around the sun.
The average radius of the Earth to the Sun is 149,600,000 km so the diameter is 299,200,000 km. Earth's average orbital speed is 30 km/s or 0.03 km/ms. Combining these two numbers to get ms, (299,200,000 km / 0.03 km/ms) = 9,973,333,333.333 ms, which is very nearly 10 billion.
The siblings comments to yours are right - it's nearly random chance (give or take conservation of momentum during accretion of the solar disk into planets).
The nice denominator is what makes this interesting at all though, so the question sort of boils down to why Earth's orbital radius is such a round number of milliseconds.
The distance light travels in a kilosecond.
unless i am grossly misunderstanding something, this is just an interesting tautology, similar to why torque and power curves for ICEs always cross at the same rpm.
https://en.wikipedia.org/wiki/Milü
355/113: >An easy mnemonic helps memorize this useful fraction by writing down each of the first three odd numbers twice: 1 1 3 3 5 5, then dividing the decimal number represented by the last 3 digits by the decimal number given by the first three digits.