I applied to one company and got a response back which was effectively "we really like you as a candidate, but it doesn't seem like you would be the right fit for this job / it doesn't seem like the interests you expressed in your interviews [which they correctly restated] matched up well with the duties we would have you perform. We will likely have jobs opening up which would align with what you like and you will be on the shortlist of candidates if you apply for those". Was it truthful? Who knows, but it left me feeling happy about how things went and I would consider applying there again.
Similarly, earlier on in my career after taking a few CS classes I applied for a different job, and the response was effectively "You are smart but you don't have the skills we require yet which are [x, y, z]. Come back when you do". What they said was true and I appreciated the feedback.
Contrast that with the myriad companies I applied to and never heard a response back from or didn't get a response back for many months from. I will never apply to these places again because it is clear that they don't respect prospective employees enough to even send a perfunctory email. Boiler plate rejections aren't as irritating but they are definitely still irritating. If you don't provide reasons for not hiring then employees will construct their own reasons, and they may not be true and / or favorable towards your company.