The Unifi APs can work with any switch or router...we have hundreds 'n hundreds out there at clients with HP ProCurve switches and Untangle firewalls.
However, for your ease of management, for small networks...why not use the entire Unifi technology stack. It makes things sooooo much easier for you to setup, configure, and down the road...manage. Putting throttles on, creating VLANs, studying traffic to find out who the culprits are, using DPI stats, changing DHCP or making reservations, port forwarding, and so much more! Having a Unifi gateway and a Unifi switch with Unifi APs just makes_it_so_nice and simple. And especially down the road when client calls and you have to do some change to the network.
Having an EdgeRouter there...do to anything, you have to remote into some PC on the clients LAN, and fire up a browser and log into the router old school way. Fine if you like doing things the old fashioned complicated way. But for the IT guy/MSP guy...having centralized multi-tenant cloud portals to fully manage your clients in one stop...it just soooo nice!
We also got a tonna networks out there with edge routers and edge switches and Unifi APs....but once the Unifi controller got matured about 2 years ago....we started using Unifi gateways and switches and things are just so much easier for us....no reason to go backwards.
Ubiquiti has been working on a multi tenant controller for edge* products...called UNMS. Still in BETA and has a loooong way to go. I spun one up last fall, got about 80 devices in there...we can monitor, and upgrade firmware. But no management yet...that's a ways off. And it will not manage Unifi products...just monitor. So still will need 2x different portals to do one thing on hybrid networks.