What are the advantages of investment casting?
I think the investment casting of the entire headtube is something particular to BMX bikes. It makes sense, for reasons outlined below. 

Typical parts of a bicycle which can be investment-cast are:


Head lugs
Dropouts
Seat clusters
Bottom bracket shells
Seat-stay and chain-stay bridges
Fork crowns


The easiest way to see why investment casting is preferable is to compare it to the alternative ways the same items can be made: (modified from here)


Investment Casting: This is the most common method of making high quality lugs.  This is the oldest form of metal forming on the planet. 
Stamped &amp; Rolled: This is the lease expensive way to make lugs in large quantities, as they can be stamped from a flat sheet, and formed into the required shape.
Bulge Forming: Relatively rare, this involves placing a steel tube into a shaped mold and using hydrostatic pressure to expand and shape the tube.
Welding/Brazing Tubes Together &amp; Filing:  This is also a common method, but intricate and time consuming.
Machined/CNC'd: Possible but not really used. Wastes a lot of material.


The two biggest problems with all the alternative methods are:


They are formed into a different shape from a cold, pre-formed piece of metal (Stamped, Bulge, Machined/CNC'd), thereby reducing strength, or
They have some weak spot (Rolled, Welding/Brazing), thereby reducing strength.


In investment casting, the steel is allowed to settle into its final shape while it's hot and allowed to slowly cool. This means that in it's final form, the metal is under absolutely zero stress trying to maintain it's shape. Furthermore, it ensures very even distribution (for example, rolled steel may be thin on the convex side and thick on the concave side).