Antidepressants are commonly used to treat anxiety because it has been discovered that the same brain changes occur in both conditions. The primary difference is that often higher doses are needed to control anxiety.
In the past, anxiety was usually treated with anxiolytics, most commonly benzodiazepines (e.g. diazepam/Valium, lorazepam/Ativan, alprazolam/Xanax, etc.). The problem is that these medications can be addicting and don't really address the underlying disease mechanism. Antidepressants don't have addictive potential and address the underlying problem. Today, anxiolytics are usually used short-term for treating panic disorder and specific phobias (e.g. someone afraid of flying may ask their provider for a few Ativan so they can take one or two prior to the flight).