Well, it does what you say. I wonder whether this has anything to do with your having 7 Canadas in your game as opponents. (EDIT: It appears not, since I was also able to replicate this in a game with a "normal" array of AI civs.)
Even weirder is that the extra Spice resource shows up in the Resources tab as "Gameplay Bonuses ... +1". The same line appears in Coffee, Cotton, Amber and Rice. As I look around the map and your suzerainships, you are getting Coffee, Cotton and Rice from Bologna, so that would account for those Gameplay Bonuses, but Kumasi (your other suzerainship) is giving you nothing. Did you do the same trade/remove improvement/replace improvement dodge with a source of Amber?
Anyway, further testing shows this to be completely broken. Remove the improvements on 2 Spices, Spices go to -2 (producing 1, exporting 3 and the "Gameplay Bonuses" line goes away), then replace the improvements, Spices go to +2 (producing 3 and exporting 3 with +2 Gameplay Bonuses). Then trade those two "Gameplay Bonuses" Spices, and Spices go to -2 (still producing 3, but now have 5 export trades and the "Gameplay Bonuses" line disappears again). Remove the improvements on 2 Spices, Spices go to -4 (only producing 1 and exporting 5 and no "Gameplay Bonuses" line). Restore the improvements and Spices go to +2 (producing 3 and exporting 5, plus +4 Gameplay Bonuses).
At that point, there are only 2 remaining AI and you can only trade the +2 net spices that you have (rather than the full 4 "Gameplay Bonus" Spices that the Resources tab displays). Doing those last trades takes you to -4 Spices (producing 3, exporting 7 and the "Gameplay Bonuses" line disappears again). Remove the improvements on all 3 of your Spices and you are at -7 Spices (producing 0 and exporting 7). Restore the improvements on 3 Spices and now you have net +3 Spices (producing 3, exporting 7 and +7 from "Gameplay Bonuses"). If there were more AI in the game, I think this could go on forever, but it appears that you will only get enough Gameplay Bonuses to get you back to the maximum number of resources where you removed and replaced the improvement on the same turn (here, you only had 3 Spices to play with, so the most I could remove on one turn, and restore on the following turn, was 3).