When hedging with CFDs, buying and selling the same financial instrument, don't you end up earning nothing respectively losing because of the spread?
I think you're misunderstanding the purpose of CFDs and hedging. When you use a CFD for hedging, you're not buying and selling the same instrument, you're using one instrument to offset risk in another.
Suppose you're a German manufacturer and have a large order from a Russian customer, who can only pay in Rubles when the order is delivered in 9 months. You are a manufacturer, not a bank, so you have no idea what the exchange rate between the Euro and Ruble will be in 9 months, but you are satisfied with the terms given the current exchange rate.
You talk to your bank, who offers to use a Contract For Difference to protect you from fluctuations in the exchange rate in 9 months. If the exchange rate goes up (meaning your rubles are worth less) the bank will compensate you for the difference, and vice versa.
So your "hedge" just reduces your exposure to the RUB/EUR exchange rate - you still made money on the actual sale, but don't have exchange risk now.
Hedging is not about profiting, it's about managing risk. Sure the exchange rate could have moved in your favor and you'd have made even more money, but it's just as likely that you'd have lost money, possibly to the point where the entire deal would have been unprofitable.