Few principles at play here. I'll keep it in simple English to make this as useful as possible.
Before that, yes your muscles are rested and ready to perform better. Doing physical effort for long periods of time is good to maintain your musculature but it won't directly help your sport. It basically means that the negative effect of time you spent off from training is less.
There's some other stuff going on too:
Firstly, related to neural adaptations. Your central nervous system (CNS) learns movements (like the shot put), i.e. it gets more efficient at it, thus increasing your performance. The more you do it the better it gets. The problem is, when you practice regularly for an extended period of time without breaks, depending on the calibre of your coaching you often (almost always) develop bad habits or inefficiencies. If you keep on practicing you will keep ingraining those bad motor patterns. You may notice technique flaws and try to make your body perform the correct movement pattern, but often it will persist in the inefficient one it is used to.
But once you take an extended break (more than a few weeks, depending on the movement in question) your CNS actually forgets a lot of what it learnt. Now, the minute you get back to practicing the movement again, you no longer have a CNS longer trying to use dodgy motor patterns. However, what you do have is a CNS that is already primed from previous practice to learn this movement as quickly as possible. So you have a chance to develop a superior movement pattern and additionally this time you know what you're doing. Result: the movement feels fresh. You start feeling things differently, your muscles activate better, your body listens to you efficiently.
Secondly, staleness. Your body adapts to a stress (throwing the shot put taxes your muscles in a certain way) and gets better (builds stronger muscles). Initially the adaptation happens very fast, but as you keep stressing it with a similar stressor the adaptations slow down (this is called the noob effect, super fast progress at the start then slow thereafter). The longer you spend training the same stressor/movement the more stale it gets. Often you will hit a plateau where you keep on pushing a movement but it just doesn't improve, or it does so very slowly.
Now, if you take a break from that stressor for a while (can't be too long though) and come back to it, the noob effect repeats: you find very quick initial progress before slowing down again. But often (for athletes who aren't too advanced) the heightened progress is enough to blast past a plateau and get stronger than you ever were.
Staleness happens physically (muscles stop getting strong) but also psychologically (you just get tired of that movement).
This is one of the reasons periodization exists btw, you can't train the same quality for ever so you transition from one quality to the next through your training cycle. By the time you come back to the first quality you are fresh and progress quickly on it again.
This is why athletes have off seasons. Training for a particular sport constantly leads to staleness, burnout, and progress stops. If you take a few months off every year you have a chance to regain mentally and physiologically.
Also it depends how elite you are at your sport. The staleness and CNS learning concepts are more pronounced for beginners than they are for advanced athletes (i.e. you can afford to take longer breaks and still have beneficial quick adaptations once you come back)
Refer to The Scientific Principles of Strength Training by Chad Wesley Smith and Mike Israetel. Lists studies and further references in there.