In the early 1920s ground effect was not as well studied as today, so it was not considered during development. These stub wings, mostly called sponsons, were meant for roll stabilization on the water, so they were aerodynamically shaped buoyancy aides. Dornier had studied the optimum hull shape in the early 1920s with water tunnel tests, and the result was the flat-bottomed Dornier hull with sponsons.
The sponsons were mounted with significant incidence, not only to provide some more lift in flight, but mainly to reduce spray when sailing through choppy water at high speed.
From a 1925 Russian memorandum on hydroaviation, about the Dornier Wal, a 1922 flying boat design using sponsons:
The distinctive feature of this aircraft was two protrusions on each
side of the hull (so-called "gills") instead of under-wing floats
providing lateral stability. Thanks to its flat bottom, the airplane
could if necessary take off from snow or ice.
Other manufacturers of that time used outriggers, called under-wing floats in the citation above. One example is the Avro 510, which also used an extra float below the tail for stabilization on the water:
Avro 510 (picture source)
Those and especially their bracing struts and wires produced much more drag than sponsons. Later designs sported retractable outriggers which proved to be the least draggy solution.
Dornier 26 with retractable outriggers at mid-span (picture source)
Ground effect grows with a diminishing ratio of both wing chord over height and wing span over height. The first effect is much more pronounced for sponsons in the most drag-intensive phase of take-off from water, namely when the flying boat changes from buoyancy to planing lift, the so-called hump. The second part of ground effect, however, means that the wings also contribute some drag relief; something that works for all flying boat designs. Yes, there is a tiny and unintended advantage from the ground effect of sponsons, but given that water is 800 times more dense than air and slow planing will involve the full width of the fuselage, any aerodynamic help from the sponsons can be neglected.