We don't really know
There seems to be a genetic predisposition to developing jra.
It is thought that there may be environmental factors that trigger ones immune system to inappropriately attack one body tissues. (autoimmune) for example exposure to smoking
has been implicated. Considerable research is being conducted on finding the exact triggers and autoimmune pathways.