Detox is primarily concerned with treating the physical symptoms of addiction, rather than the underlying causes. It is only one part of a comprehensive recovery plan. If a client leaves detox without understanding why they developed an addiction, they are vulnerable to relapse.
People leaving detox will likely be exposed to many of their old triggers and motivations for using, which can be dangerous. However, with the correct therapy, recovery tools, and coping strategies, their chances of success massively increase.