Using cash to purchase a home allows you access to certain deals that mortgage buyers cannot take advantage of. These are typically distressed properties and need to be moved off the books quickly. Think of things like foreclosures and auctions.
This does not mean that it gives you an advantage with every house on the market. While you may be able to close quickly, with cash, some buyers may choose to wait for the (presumably) higher offers of mortgage buyers.
There are complications to purchasing in cash then mortgaging to replace that cash. Namely, how was that cash invested? If one were in mutual funds or stocks, with the money, one will have to pay capital gains tax on any profit. If those investments increase in value, during the time the money is tied up, what do you do then? Do you buy at the higher value or hold it back and dollar cost average it in?