Why is this apartment water heater so much more expensive than my bigger home one?
I think it's fear of downgrading.
I think the pro plumbers are unwilling to downgrade them.
For instance, the latest Codes require water heaters to have better insulation than they did before. This means they are larger.  This is a well-known problem: a new heater often won't fit in the same location.  That means you must either downgrade a size, or go to a taller heater.  That's already a pretty tall heater, and it's hard to go much taller in that space, so they may be forced into something exotic to stay at 50 gallons.
Why not just quote the customer a 50 and a 40/30 and let them decide?  Because in the real world, plumbers are finding that people don't understand the consequences of their choices, and blame the plumber.
So they might have better luck opening the dialogue with asking for the downgrade: &quot;I hate that 50-gallon thing, I'd much rather have a 30 like I used to have, and get rid of that stupid pre-heating system too, it just makes my cold water hot&quot;.  That way you are putting the plumber on advance notice that you want the downgrades.
There is no reason for a 2-person condo to need a 50-gallon heater if they are sensible with showers (and showerhead flow).  If they are insensible with showers then they are better off with a gas tankless, which will provide unlimited hot water at perfectly respectable rates.  Gas tanklesses are expensive, but they're sure as heck not $4000.
It may also be a bacteria thing
Science has made a lot of forward progress on how people get sick from hot water (the Flint water crisis had a little to do with this).  It turns out, water heaters set at certain temperatures are breeding grounds for bacteria.  These are the same temperatures you set to avoid scalding, something you really want for seniors, who might have a &quot;senior moment&quot; and blast the hot.   Unfortunately the most vulnerable people to water-heater-borne bacteria are also seniors.
So... the gold standard for retirement communities is now to jack water heater temperature up to a bacteria-killing 140F/60C.  However, since that creates an equally bad scald situation, this can only be done if ALL hot faucets are changed to thermostatic types that will automatically mix in cold water to keep water at scald-safe temperatures.
So the big quote may include re-kitting the house with appropriate faucets, including shower-and-tub work, which can get expensive if the builder didn't leave you an access hatch.
A pleasant upside to having hotter hot water, is that the same temperature at-the-faucet uses less hot water, and that makes the hot water runtime run longer.  So a 40 gallon tank @140F  can easily replace a 50 gallon @115F.
I also suspect a cheapo &quot;pre-heating&quot; system
Some people like to install &quot;circulation pumps&quot; to churn hot water down the pipes, so the hot water in the pipes is already hot, and they get almost instant hot water out of the faucet.
This requires a &quot;return line&quot; back to the water heater for the water that was moved through the pipe.  Most houses do not have this hard-plumbed.
So the el-cheapo method of solving this problem is to simply use the cold water line as a return pipe - taking the tepid and warming water in the pipe and pumping it back into the cold water pipe.
Now, consider the implications when this is combined with a bacteria-safe 140F water heater and thermostatic faucets.  The user calls for hot water -- too hot!  So the thermostatic faucet automatically mixes in some cold water to reduce the 140F hot down to safe temperature. Except the cold water is too-hot also, because of the cheapo circulation pump filling it with hot water.  This creates a guaranteed-scald scenario.
Needless to say, this all creates a big mess for the plumber to have to contend with, versus customer expectations that nothing get worse.
Let me harken back to the idea that tankless heaters don't heat water except during flow, so they don't store hot water, so they don't breed bacteria.  You can set a tankless to 110F and just run it like that. That takes the scald situation completely off the table.