Internally, Flask uses thread-local objects so that users do not have to transmit objects from function to function within a request to stay thread-safe. This method is beneficial, but it necessitates a proper request context for dependency injection or reusing code that uses a request-specific variable.