The most popular UI frameworks out there (including VCL and FMX) are not thread-safe.
Thread safety is the ability something (like a piece of code, a library, a framework, or something else) has to properly work in a context where multiple concurrent threads are involved. Properly work here means having no runtime errors, memory leaks, memory overwriting, and so on. It does not mean it is the most efficient way to accomplish the task.
Everything is run in a single thread that will be the owner of all UI objects and the executor of all UI-related tasks. The reason is that a thread-safe UI environment would likely require a lot of synchronization. Synchronization is what is needed to avoid collisions while dealing with the same object and multiple threads. There are a number of techniques related to synchronization but, to get the concept, we can consider one of the simplest forms of synchronization.
When a resource is (or has to be) shared...