Make sure you are comparing the same things. LaJolla's price probably includes all the work to take the old stuff out and put the new stuff in + changing/incorporating all the EFI components into the old car's systems. Ie, you drop your car off and then pick it up a few weeks later.
For reference I had a 1991 735i engine rebuilt in Seattle last year. Cost about $5,500. But I carted it the shop and picked it up. The full stock rebuild included new pistons, rings, reground crank & cam, ovaled crank oil ports, some minor porting, cleaning/painting, new seals/gaskets/chains/etc.
Consider all the labor of removing the old engine, buying a used engine, stripping the parts off, getting it rebuilt, then re-accessorizing it, re-installing, re-wiring, plumbing, EFI harness, buying used 5 spd, shortening driveshaft, replacing seals, etc... It adds up. It sounds like you will be doing that part yourself.