to plants ammonia is a food source, not a poison. Depending on the exact aquarium plant, they can absorb nitrogen compounds like ammonia and nitrite through their leaves and root systems. Plants use these as starting materials to build nitrogen compounds of their own for energy and structure. So under ideal situations, plants can be used as a "nitrogen sink," a place to dump these compounds and get them out of the aquarium water where they can harm fish.