There are a variety of reasons authors may publish in a predatory journal:
A mistake - they thought it was a legitimate journal
Need to publish something immediately (often for publish/perish reasons) - either because they already have other legitimate publications or because of a deadline
Couldn't get published in a legitimate journal - often because the data is incomplete or false (e.g., fake science, science focused on a specific point of view) or because the article didn't meet the requirements of other journals (e.g., a new science)
NIH Steps to Assist Authors
NIH linked information on publishing in authoritative journals.