The most common reason an inquiry would show up on your credit report is because you applied for credit and the creditor pulled your credit report.
Collectors can also place inquiries on credit reports, though the legality of the practice is debatable. For now, it seems that it is legal but with time perhaps the courts will find differently. Collectors have no legitimate reason to place hard inquiry on your credit report. The ONLY possible reason for placing a hard inquiry versus a soft inquiry would be to inflict damage to your credit score.
If you have a large number of inquiries on your credit report it can be harmful to your credit score. The lower your score is to begin with, the more damaging the inquiries will be.
Victims of identity theft sometimes get large numbers of inquiries resulting from the ID thieves applying for credit in their name.
For this reason, it's a good idea to keep an eye on your inquiries.
Every hard inquiry on your credit report must have a permissible purpose. If a hard inquiry was placed on your credit report and the company who placed it did not have a permissible purpose, they could be liable for damages.
You can dispute unauthorized inquiries to have them removed from your credit report permanently.
(See our other articles on inquiries for more information on removing inquiries.)