Is it worth sending an email to the hiring department to ask them why I didn't get the job that I applied for?

Is it worth sending an email to the hiring department to ask them why I didn't get the job that I applied for?
Post Opinion