If you want to add many files in a loop, there is addAttachments() method. If you use just attachments() previous added files will be overwritten by newest one.
Checked at 3.1 - it works.
https://api.cakephp.org/3.1/class-Cake.Mailer.Email.html#addAttachments()