The program at the point it reaches the return statement is not in a subroutine other than loop(). So where does it return to? Does it gist restart the loop() code?
I consider myself to be a descent C programmer but Arduino does things a little different. I'm not sure why they ditched the main() sub to replace it with setup() and loop(). Thanks for the help.
When the Arduino was started decades ago it was intended as a simple way to use micro-controllers for non programmers. I thought of it as micros for artisans and poets. Since then it has grown like a cancer and become much more complex
There in fact is a main() function (they're not called subroutines in C / C++). It's just hidden from easy viewing (but you can find it) in the Arduino world. Its job is to initialize some hardware, call the setup() function where you do one-time stuff, and then call the loop() function inside an endless loop.
Now consider for a moment what your own main() function would do if this Arduino setup/loop paradigm didn't exist. It would initialize some hardware, do some one-time stuff, and then it would continually execute your main code in an endless loop. Sound familiar? So, the setup/loop paradigm works the way you'd write it yourself for 99.999% of the use cases.
It depends on the details of your Arduino installation. I use Portable Installations. So, for v1.8.15 of the IDE, 'main.cpp' is in 'D:\Arduino-1.8.15\hardware\arduino\avr\cores\arduino'