Is it cheaper to mass produce a carbon frame than an aluminium frame?
Given that alloy framed bikes are generally cheaper than CF framed bikes, it's reasonable to conclude that an alloy frame is cheaper to produce than a CF one.

There are some videos on YouTube that show the basics of the process of making a CF frame. There hundreds of individually cut sections sections of CF cloth that need to be combined together in multiple steps to give the frame strength where it is needed. All the sections of CF cloth need to be combined together in moulds by hand. This is where a lot of the cost comes from.