Over the last few years many alleged real estate experts have written articles, blogs, posted websites etc... to discourage home buyers from using home inspectors referred by real estate agents. The alleged theory being that the agent will refer a crappy or worse dishonest inspector so that the sale will go through easier w/o a thorough inspection.
People hire a real estate agent for two reasons: to gain insight into the local real estate market and to guide them through the complexities of the home buying process including securing a mortgage, getting an appraisal, securing title insurance, the attorney review of documents and scheduling a home inspection. Most home buyers probably don't have these people lined-up and they rely on the real estate agent to refer professional and competent attorneys or mortgage brokers or home inspectors. My experience as a home inspector is that the great majority of real estate agents want you to do a good job for their client and will refer you based on competence and honesty.