Is there any scientific reason for the jovian planets to be in descending order of size or is it purely coincidental? In terms of radii it goes Jupiter, Saturn, Uranus and Neptune.
Since the initial formation of the solar system and after the initial mass formation of each of the planets let's see what what we can derive from the laws of physics.
Any mass that could further accumulate on any planet would have to come from 3 places:
In the nearby vicinity of the planet's orbit.
From outside the solar system and extra Pluto Kuiper belt objects.
From the Sun as solar wind.
We can surmise that in the first 200 million to half billion years in the life of the solar system, the planets would have grown in the most mass by (1) sweeping up the asteroids and debris in their orbit and vicinity. In fact, Jupiter with its huge mass continues to pull away stray asteroids to a lesser extent to this day.
The occasional encounters with objects coming from (2) outside the solar system are too rare and far in between to be of significance. The cosmic rays from external to the solar system are also not significant for mass gain.
That leaves (3) the solar wind. Whether a planet gains or loses mass from the solar wind is a balance between the
(a) Gravitational escape velocity of the planet, which is directly proportional to the mass of the planet
(b) Average temperature of planet's surface and atmosphere
(c) Average speed or kinetic energy of the particles from the solar wind
(d) Intensity of the planet's magnetic field.
(e) Intensity of the solar wind, which is inversely proportional to the square of the distance from the sun.
The (e) factor was and still is much too strong for the inner 4 planets to gain mass from the solar wind. Being that the escape velocity would be too low to keep the atmosphere with the ongoing assault of the solar wind as is the case with Mercury and our moon. We can thank the earth's magneto sphere for saving our atmosphere from the solar wind.
Now when we get to where Jupiter's orbit is, about 10AU, the intensity of the solar wind is one hundredth of what it is on the earth. The solar wind that does reach Jupiter is decelerated and deflected towards the poles by Jupiter's very strong magnetic field . And since the escape velocity is so high due to Jupiter's mass, most of the solar wind is absorbed into Jupiter resulting in mass gain from solar wind over time. Not even hydrogen can escape Jupiter's gravitation.
The same net gain from solar wind applies to the next 3 gas giants Saturn, Uranus, and Neptune. Since these are in order further away, the solar wind intensity correspondingly less. All three still have a high gravitational escape velocity due to their size and the ones further out have a very low surface temperature so the gases don't have enough average energy to escape.
As we go further out from Jupiter the same dynamic of mass gain through captured solar wind plays out, albeit less and less due to the distance from the sun.
While the solar wind for purposes of planetary mass gain may seem insignificant now, we must understand that this was not the case earlier on. And over 5 billion years much mass can be gained in this manner.