At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
The cost of the process is proportional to how much material (rock, dirt, whatever) you have to process. The more material to be processed, the bigger the equipment, or the longer you have to run it, and the more power and other other materials you need.
You might hope to pay for the process by selling the copper you get, since copper is a valuable metal. But if the amount of copper you get is only a small fraction of the amount of material you have to process, you might not get enough copper to sell to cover your expenses. That's probably what you mean by it being "expensive."
Consider the extreme case: what if there is no copper at all? In that case, you spend a ton of money grinding up a lot of rock, reacting it with acids, running electric current through it, et cetera -- and wind up with just a lot of worthless ground-up mush. That would certainly be a foolish proposition!
Or the other extreme: what if the material was 100% copper already? In that case, all you need to do is gather it together into one spot, melt it into convenient ingots, and put up a "Copper For Sale" sign. That would be very profitable!
Reality lies in between, usually. Good copper ore is about 1% copper by weight, and the value of the copper is enough to compensate for the cost of extracting it. But for less than perhaps 0.2% copper, you will spend more getting the copper out than you can sell the copper for.