When we turned over a board in the field at science camp we saw these black ants scurrying to protect the small white larvae and pupae in their nest. I told the students to put the board back just like they found it so they could "put the roof back" on the ants' home.
I suspect the large larvae and pupae may be a different species of ant, they are much larger than the black adults caring for them. There are some species of "parasitic" ants that lay their eggs in another type of ants' nest. The invaded ants will care for the larvae and pupae as though they were of their own kind. The following photo shows the drastic size difference of the ants and the pupa. However, if you look closely in this photo you'll see a few smaller pupae which are probably the same type as the black adults.