Android (sometimes; some ROMs have it disabled) uses a system called zram where a portion of memory is compressed to store more data. This vastly increases the amount of memory available nearly for free, but the system doesn't play well with swap and actually degrades performance when both are enabled.
The other historical problem was that enabling swap on a phone could rapidly wear down flash storage such as EMMCs, but that's not as much of a concern these days.