Should a home buyer ever get an inspection before a contact has been signed? In most cases I would say no, but there are some special circumstances where an inspection before the contract has been signed is a good idea.
The first instance is if the house is being bought as is and is not contingent on an inspection. If an inspection is done after a contract is signed and there are problems, then nothing can be done. I have done a couple of these inspections on houses that were foreclosed. In one case the house was relatively good condition with no big problems. In another case the home had several large issues (all the copper had been stolen plumbing and HVAC lines had been stolen). Since the home was sold with no contingencies the buyer was left to fix the problems.
The second instance is if it is anticipated the home will have several offers. In some cases a home will go on the market and have multiple offerings on the day it is listed. If you get an inspection so that you know what issues there are, you can make an offer with no contingency. This could lead to your offer being accepted.