The maximum may be limited by the wiring. Gain sets the maximum amperes of current the controller will try to send the brakes at full braking.
These are rough, but reasonable numbers - every trailer is different. Maximum amps for braking on a tandem axle is around 15A. To deliver 15A @ 13V requires a system resistance of under 0.87 ohms. The brakes themselves are most of that (~0.85).
Then there's the wiring and connections.
For full current, they can't add up to more than 0.02 ohms. To make a long story short, to get full braking, it really needs to be wired with separate 12 gauge runs from the tongue to both the right and left side brakes, which is uncommon.
Point is, any controller setting beyond what the wiring allows may make very little difference. If the wiring can only allow 10 amps, telling the controller to provide 15 is an exercise in futility. Setting the gain (max amps) won't really make a lot of difference if the wiring isn't up to snuff, although you will get to maximum braking sooner.