Is it coïncidence that the mass of a planet has about its maximum in the middle planets (Jupiter), while the mass of the closest and furthest planets has a minimum (Mercury and Pluto)?
First, Pluto isn't a planet, and hasn't been for about a decade. It's a dwarf planet, and is better grouped with other small, rocky objects beyond Neptune's orbit, such as Haumea. These objects, and other minor planets, have more in common with objects in the Kuiper Belt and Oort Cloud than the eight planets of the Solar System.1
Therefore, we see a different pattern: Four relatively low-mass planets (Mercury, Venus, Earth and Mars) in the inner Solar System (the four terrestrial planets) and four relatively high-mass planets (Jupiter, Saturn, Uranus, and Neptune) farther out (the four giant planets). The question now is why the two groups are arranged as they are, why the terrestrial planets are close to the Sun while the giant planets are further away.
I wrote about this in my answer to Why do the gas giants in the Solar System have comparatively large orbits compared to the inner planets?. It boils down to something called the frost line, a rough boundary before which ices of water, ammonia, methane, and other compounds cannot form. Beyond it, they can form ice crystals (not just water ice, of course), which made it easier to accrete large amounts of material from the protoplanetary disk. This leads to the more massive gas giants.
In general, this explains the mass distribution of the planets, although there are exceptions (e.g. Hot Jupiters), which often result form planet-planet interactions, rather than forming at distances inconsistent with the frost line.
1 I exclude Planet Nine from this list, as its existence has yet to be verified.