I have a refurbished 2015 MacBook Pro 13", Intel i7 Processor, 16GB RAM and 512 SSD. When I first began using it I noticed it got unusually hot rather often, and so I downloaded Macs Fan Control to keep tabs on it. But whenever I do anything remotely resource intensive, for example playing music or using a virtual environment or using Xcode or VSCode, the CPU gets to temperatures over 100 degrees celsius. This is concerning and I believe it may have made the computer reboot a time or two, though that may have been something else. I am able to control it by keeping tabs on it but it is rather annoying and very worrying that the temperature gets that high. Are there any reasons why it does this?
Those temps are most likely fine.
MBP models usually range from about 40ºC (104ºF) to 100ºC (212ºF) depending on whether the CPU is idle or under load. CPU temps (just like ambient temperatures) typically have a bearing on GPU temps too, especially within the extremely confined spaces of a MacBook Pro.
If you'd like, you can refer to the Intel Mac Temperature Database to see the various temperature ranges reported by users. You can also filter the list by model etc.
If you're still concerned, you can reset the System Management Controller (SMC).
The SMC is basically a chip in Intel-based Macs that manages many of the physical aspects of your Mac. This includes power buttons, LED indicators, cooling fans, how your Mac works in its various sleep modes, and so on.
Because the SMC is a sub-system of your Mac, it is not dependent on an operating system being installed.
You may be interested in reading Reset the System Management Controller (SMC) on your Mac for further info and instructions on how to reset it.