The code is physical but the license itself is digital. As you used that key, Microsoft has licensed your specific hardware to that key, so reinstallation probably won't need another key. This is also why if you change the motherboard it asks you to activate again.
If you do end up replacing the parts and the key doesn't let you activate, it is worth telling Microsoft about it and they will unlink the current activation so you can use it on your new build.
Also, just to answer your question, nothing went wrong here. As long as it says it is activated and the "Activate Windows" watermark is not there, you don't need to worry about anything. In the future should anything happen, you have the receipt of your license code purchase so you can ask them (Microsoft Technical Support) to help you out with it.