Some eating disorders, namely Anorexia and Bulimia, can make urine smell bad. There are two main reasons for this effect.
In Anorexia and sometimes in Bulimia, a person might push his or her body into excessive ketosis. Ketosis is a metabolic state where the body uses fat for fuel instead of sugar. While ketosis is normal at times, if it becomes excessive, it can cause your urine to smell bad.
Repeated vomiting can also make the body produce stinky urine. So Bulimia can contribute to a problem with smelly pee in this way.
If you believe that you might have an eating disorder, seek out the advice of a therapist or medical professional who specializes in treating eating disorders. They will have extensive knowledge on how to help you free yourself from the pain eating disorders cause.