This is obviously an area too big to adequately address in a HN comment, but just the broad strokes:
Spontaneous thoughts that you were referring too, can basically (simplifying) be seen as the mind's way to avoid certain feelings that it has labeled as "bad". For example there can be some situation which you translate into feeling "alone" (only an example), and that feeling is labeled as "bad". Every time such situation will happen, that feeling will start to manifest in your system, but the brain will usually very quickly start to think some thoughts in order to distract you from such feeling. For the brain it sounds like a good idea, because there will be less of that "bad" feeling in your conscioussness, while you think.
Now of course, in general, it's not a very good solution, because it only masks a problem. The problem itself is that you don't fully accept and understand all your feelings, and instead are labeling some of them as bad. Additionally to this, if you don't accept the feelings, but instead try to mask them with thoughts - that just makes them grow, because the feelings are not being let out of the system and start living their own lives.
What happens during meditation is that you force out all of the thoughts, so that feelings that exist in you become much more clear. You can finally switch your attention to the feelings that have been craving it. Then you become more aligned with them, understand them better and they stop being problematic. Each time you stop meditating - it's just so much more easier to notice that certain thoughts come from feelings, as opposed to "just randomly initiate".
So it's not really about being aware of the thought process during the meditation, it's more about using the experience gained from meditation, as a reference point, in order to notice deviations from it and how they are experienced.