Apparently if you pile up enough of them, it can reach a critical mass where the rest of the colony says "fuck this" and "nopes out". A large enough pile of dead ants near a colony entrance can cause the rest of the colony to leave their current location, pack everything up, and re-build their colony elsewhere.
My friend used this to his advantage during college to successfully evict several ant colonies from his room. YMMV.