While it isn't illegal to make copies of existing castings
for your own use, distributing them to others without permission of the manufacturer is illegal and can be (and often is) prosecuted. There are a couple of reasons you would not want to do this (see below for a good physical reason), but also the person making the product is depending on sales of his or her product to pay for their time and expense in producing it (at the very least...)
Most brass casting for model railroads these days is done using the investment (or "lost wax") method. This involves the creation of a master pattern, that is duplicated in wax or a special plastic, and then cast in brass. Often the master casting is replicated so that it can be efficiently cast on a sprue, so the final product is actually a second-generation copy of the master. There is a 4% shrinkage each time, so that the initial master has to be 8% larger to allow the final casting to be correctly sized. This process involves some specialized casting machinery, as well as a reasonable skill level to get a quality product. Investment casting is also done by jewelers, so that might be a good source for additional information regarding the process.
Bill Daniels
Santa Rosa, California