Somehow this way to inflate home prices isn't considered fraud, though it sure looks that way to me. Here's how it works.
A buyer contracts directly with a builder for a home. Maybe it's a build job, maybe it's to buy a speculation home the builder built and now wants to unload.
Builder and buyer agree on a price. Included in the price is the builder's normal profit, or at least some profit. This will be backed up by an appraisal. If the builder built 20 homes in a subdivision, all about the same value, and 10 have sold, that's going to establish a decent comparable value and the appraisal will reflect that.
The buyer gets a loan on the appraised value, or at least some high percentage of it, like 90%. Buyer pays builder, and typically the check is written by the lender to the builder as part of the closing. Builder then writes the buyer a check that represents the discount on the sale price they had agreed to. I guess the justification is that the builder gets the usual profit, but has agreed to share it with the buyer. Lender knows nothing about this.
Is anyone who's part of this transaction harmed by this deal? Usually not. Builder unloads inventory and cuts off interest on the construction loan. Buyer gets a nicer home. Lender gets repaid by buyer as per their contract. Local government gets higher taxes, based on the ostensible selling price. The loan officer gets a higher commission. (The loan officer and the lender are usually two separate entities; both get a bite of the action and make money off the buyer.)
The losers? Again, neighboring honest home buyers, who buy overpriced homes because their home value is set by comparable sales. They also pay more in taxes than they should as well.