I think the difference is in the control one has about what is being connected.
A scope has an analog input, 1 Meg || some pF, whatever voltage appears there needs to be processed/displayed. IOW anything behind the input BNC (in terms of signal flow) is controlled by the device manufacturer and thus relatively easy.
For a siggen there is no telling what may be connected to the output BNC. Yet the siggen must do it's best to produce a reasonable signal, must not be destroyed by extremes, must not be disturbed overly much by unusual stuff on it's output - especially for multi-channel siggens, any coupling between channels would be bad. And it must be able to output a little bit of power, maybe several 100 mW into 50 Ohms.
Not really. There's not a much difference between a simple digital scope and an AWG in terms of complexity, really. And it's not that an AWG takes what happens past its BNC into consideration, all it does is to produce an output calibrated at 50ohms or 1Mohms and that's it. It doesn't adjust for impedance mismatch, or any other disturbance that might occur, and if the output is shorted then the AWG might get damaged as easily as if the output is exposed to excessive voltages, unless the AWG has protection in place (not all do).
For a scope application you can get away with a sampling frequency x3 of the scope bandwidth, i.e. 1GSa/S for a 300MHz bandwidth. For a waveform generator you need many more samples -> much higher sampling frequency.
No, you don't. You make quite a few misconceptions here. First, the best thing about the sampling theorem is that it works
exactly the same both ways, i.e. the amount of samples/s a scope needs to accurately reproduce a waveform is exactly the same as for an AWG to produce the same waveform with the same accuracy.
Second, the rated analog bandwidth of a scope refers to a pure sine wave. That means a 300MHz scope can still "see" a 300MHz sine wave (with the displayed amplitude 3dB lower than the actual amplitude). If you feed the same scope a 300MHz square wave all you'll see is crap as most signal contents that make out the 300MHz square wave will be invisible to the scope (and the lower harmonics will be at visible at various stages of attenuation by the scope's front end). So that means a 300MHz scope which is spec'd for 300MHz for sine waves only and which comes with a sample rate of 1GSa/s is perfectly fine, as 3 points per cycle are enough to replicate a sine wave.
In other words, for a given sampling frequency a waveform generator will have much lower bandwidth.
Not necessarily, there are many AWGs (mostly low-end) which have the same or higher bandwidth to sample rate ratio than a scope, for example Rigol DG1062z (60MHz 200MSa/s = 0.3/Sa), Siglent SDG1050 (50MHz 125Msa/s = 0.4/Sa), Siglent SDG2122X (120MHz 1.2GSa/s which really is just upscaled 300MSa/s = 0.1/Sa datasheet or 0.4/Sa real). Compare this to scopes like the Rigol DS1104z (100MHz 1Gsa/s = 0.1/Sa), Siglent SDS1152CML (150MHz 1GSa/s = 0.15/Sa), Siglent SDS1302X (300MHz 1GSa/s = 0.3/Sa), Siglent SDS2304 and Rigol DS2302A (300Mhz 2GSa/s = 0.15/Sa).
You cannot create a quality arbitrary waveform with just 3 samples, can you?
That depends on the waveform, but in general, no, 3 samples per cycle would be a bit low.
You can do a sinewave or square wave (sinewave squared) but not a triangle let alone an arbitrary one. If you check any arbitrary waveform gen specification, chances are you will find they are spec'ed to generate sinewave/squarewave of much higher frequency than triange/arbitrary waveform.
Yes, especially in the low end class. But the main reason for that is that, as with scopes, the AWGs bandwidth is usually defined for sine waves only (which again comes back to what I said above that the sample rate requirements for scope and AWG are the same). All composite waveforms (i.e. waveforms that consist of two or multiple sine waves, like square, pulse, triangle, whatever) naturally follow this limitation, which means that if your sine wave limit is say 100MHz then the max fundamental of any composite waveform must be much lower to produce an accurate waveform. But again, that is the same with scopes.
Some AWGs (especially low end ones) offer lower sample rates in arbitrary mode than in any of the fixed modes, but that is merely a limitation of their specific design. On AWGs which offer the same sample rate as in fixed modes the same bandwidth limit as for the fixed modes applies.
Back to the original question why function generators are expensive, well, they aren't. Function generators (which many people mix up with AWGs) are pretty cheap these days but aside from the entry level have mostly died out in favor of Arbitrary Waveform Generators (AWGs). Low end AWGs from the typical B-brands (Siglent, Rigol) are roughly as expensive as their scope, which is understandable considering the similar complexity. However, big brand AWGs like the ones from Keysight are indeed pretty expensive, and (aside from the benefits of a big brand like quality, actual support and such things) is mostly due to their proprietary technology (i.e. Keysight's Trueform) that makes composite signals like square waves look less like crap as they do on the cheap AWGs which employ pure DDS.