I think bans that move cities, states, or countries closer to command economies, where elected officials and government bureaucracies dictate every aspect of how private companies and consumers do business, are terrible policy.
In the specific cases of the iOS App Store and, to a lesser extent, Google Play, restricting Apple and Google from setting the participation terms of the marketplaces they built, established a customer base for, and maintain on an ongoing basis does not do anything to protect users or longer-term, developers. Some other payment venue will become the dominant player, raising costs for everybody.
If politicians were serious about helping users and providing choice to developers, legislation requring online marketplaces to accept cash for all transactions might be better. But the best governmental action in this case is really to take no action at all.