I get that the engines on boats are expensive, but explain to me how a boat engine can be $30K. We had a couple boats growing up but the was a long time ago and they were sold prior to any major repairs.
This is probably not apples to apples but I can put a brand new 6.7L power stroke diesel in my F250 for around $15K.
On an outboard, the engine isn't just the engine. It's also the prop, shaft, housing, mount, tilt, cooling system, computer, steering system, full set of controls, etc etc. You could put a $15K diesel in your boat, but it would be an inboard and would be the engine only, then you'd need to buy/install all those extras I mention above.