It’s impressive how creatures with a (much) smaller brain than ours are capable of complex behaviors such as taking care of their wounded. Could it be that instinct is smarter than being smart?
This is evolution at its best. As the main author of instinctual behavior refinement, evolution has given these ants an edge. Because they take care of their wounded, they could very well prevail should they get into a contest with other (ant) species.