I am aware that in a lot of cases, the sufferer has the B27 gene. However, there are at least 4 out of every 100 sufferers that don't have the B27 gene at all and some people have the B27 gene but don't get AS.
Also, it still has to be 'triggered' by viruses or reactions to the environment and we all know that if you eat healthy and take care of yourself, you are less likely to get viruses and things that trigger the condition.
Exercise is also proven to help arthritis conditions in many cases and getting enough sleep and not smoking is common sense. These suggestions are meant to help ease the situation for people who already have it.