what is the purpose of ant
These are two separate questions. Organisms do not serve evolutionary purposes. Traits within organisms affect their survival, which might be thought of as evolutionary purpose. Even that is still not quite right. This question might better ask for ecological purpose. Ants have many such purposes. They clean up dead organisms as scavengers.