Actually the costs are higher than you might expect. The cog is cast, forged, and then machined. Some heat treating occurs in there somewhere. There's a lot of work that goes into a quality cog versus a stamped cheapo.
If it were otherwise, someone would come out with the high quality $5 cog and sweep the competition.