In general, there are thousands of regulations that must be satisfied. Some specifications that must be met include ISO 13485, ISO 14971, IEC 60601 3rd Edition, IEC 62304, and probably ten more that I have forgotten about, such as RoHS, WEE, radiated emissions, etc.
The systems I worked with involved multilayer (16 layers plus) circuit boards, custom ASICs, FPGAs, ARM SOCs, etc., mixed OS (e.g., Windows CE and WindRiver, etc.)
The code base is large and complex, as you have not just ultrasound, but often, calculation packages of various kinds (cardiac, OB, etc.) These packages are expensive to develop and have to be carefully verified. If you're measuring the length of a fetal femur and translating the measured length to an estimated gestational age, you don't wish to be wrong. Same deal with cardiac output measurements, etc.
Then there is the whole issue of transducers. It's a complex field, and you have to deal not only with materials (some of which contain RoHS regulated elements, such as lead), but also, dicing saws (to cut the piezo), matching layers, transmission lines (to send signals to / from the transducer and the ultrasound machine front end.)
I'm not trying to be rude, or baffle you with a lot of jargon, it's just that my experience is that building a useful ultrasound machine is much more complex than it might appear from the outside of the industry, so to speak.
Finally, I think building an iPhone is probably even more complex, but the incredible volume of sales tends to make amortizing the cost more palatable.
I could be wrong, of course, and your comments are welcome.