Let's say I bought a 100-ounce gold bar in 1965, when gold was $35/oz, for a total price of $3500. Let's say I sold it today at $4700/oz, for a total price of $470,000. That gives me a gain of $466,500.
And let's say that I regret it. I decide that I really want to hold some gold, so I take the $470,000 and buy another 100-ounce gold bar.
The situation was that I had a gold bar worth $470,000 with a taxable basis of $3500. Now the situation is that I have a gold bar worth $470,000 with a taxable basis of $470,000, and I owe the IRS taxes on $466,500 of capital gains.
TL;DR: Selling and re-buying the same asset gives you the accumulated gains, and resets the price basis.
They had gold worth X to the market but X minus 11 billion on paper. So when France accounted for its gold in euro terms they would say they have X minus 11 billion Euros worth of gold.
Now they still have the same amount of gold but they "realized" a gain of 11 billion. They don't have that much cash left after the repurchase but now they say they have X Euros worth of gold which is 11 billion more than before.
So no they didn't make a profit from this as gold is higher on both sides of the Atlantic than last time they did their accounting updates.
If they held it for 100 years and finally sold it, then profit/loss is realized now