Id go 40 x 40 x3 ,,, and double it up on depth making it 80x40 ,,, or just buy 80 x40 x5 and be done with it
50x50x1.5 is a great workbench if you sew dresses or bake caked ,,, no use if you use a hammer ,,, mind you , you could get very artsy with it and build trusses and the likes ,,,,
Stiffness is proportional to the "second moment of inertia" of the cross section, the formula is simple or there's calculators online to work it out for you.
The 50mm will be slightly stiffer, but the heavier wall on the 40mm box will probably ring less and be a bit more pleasant to work at.
The other issue of course being distributed load. Ping a 3mm box section with a hammer and it might not even notice, 1.5mm and you could be introducing dents and deformations which compromise the structural integrity.
In terms of bending the section moduli of the SHSs [square hollow section] mentioned are almost similar with the 40x40x3 designation being about 10% stronger. For me the smaller cross section with less area for corrosion would be the one to go for together the thicker wall making for easier welding. Good luck with the bench.
Design some inertia in there while you're at it. Can you secure the bench to the floor or wall? Or alternatively build some gravity into it. Nothing worse than chasing a light bench around the workshop.
For a workbench frame, the 40×40×3 mm box section is the stronger and would be a better choice overall.
Reasons
Bending strength:
Section modulus (bending strength indicator) is slightly higher for 40×40×3 than for 50×50×1.5, so 40×40×3 will actually take a bit more load before it yields.
Stiffness (sagging):
The 50×50×1.5 has a slightly higher second moment of area, so it’s only about 10% stiffer in bending for the same span. In practice, that difference is small.
Wall thickness and toughness:
40×40×3 has much more steel in it (thicker wall), so:
Better resistance to denting and crushing
Stronger in axial loading (legs, uprights)
Much nicer and more forgiving to weld than 1.5 mm wall
So for a heavy-duty workbench, 40×40×3 mm is the better option for legs and main rails. The 50×50×1.5 isn’t “weak”, but the thin wall makes it easier to damage and harder to weld well, so 40×40×3 is the stronger, more robust choice.