Allays are simple gatherer spirits. Most commonly used by Farmers and Foresters due to their great help in gathering fallen materials and brining them back to specified chests.
Allays are non aggressive and can be won over by giving them almost anything, and in turn they will search and gather more of that item for you in thanks.
Their nature of seemingly "duplicating" items has made them susceptible to try being used by thieves and pillagers. When the Allay does not find what their captors want, they end up trapped in cages.
You can hear the wails of trapped Allays when you get close to some pillager camps.