Naval Gun Fire Support - is a difficult subject to quantify & requirements change every time you goto a different area / coastline.
While it is appreciated that a larger gun, firing larger rounds may be able to stand-off the coastline being 'softened up' , a greater distance than that of a smaller gun, the 57mm should not be underestimated, as 4.5" fires around 20 - 25 RPM, with this number reducing as time goes on, as the barrel heats up, especially during continuous firing. The 57mm has a max firing rate of circa 200 RPM, so does have an ability to put a great amount of explosives 'down range'.
IMHO, it may purely have been down to the costs, as the options offered in the design data explained that the Type 31 design (offered by the supplier), could be versatile & accept several different guns. With each variant of gun being offered, it is a certainty that the complexity of the design & integration into the hull for each different gun, would have increased costs, due to the time & resources needed to design the bow section / block of the ship forward of the bridge screen. Implying that the BAE 57mm 'marketing' was a reason for the down-select for this gun, when the ship is designed & built by a competitor to BAE, with many of the other systems that BAE provides also being 'replaced' by the shipbuilder, doesn't quite ring true.
It should be remembered that Type 31 design started AFTER Type 26, with the first hull to be in the water & effectively operational, before the FIRST Type 26. The ships are designed to be 'simple workhorses' for the RN fleet to take the strain away from Type 45 / Type 26, These facts compress the time available to complete that task, which can be alleviated by making the ship design 'simpler' & in many ways cheaper & lighter.
SA