Indeed HLA-B27 only has a partial correlation with diseases such as AxSpa.
"... about 7 percent of Americans are positive for HLA-B27 but only 5 to 10 percent of people with a positive HLA-B27 will have AS" https://creakyjoints.org/about-arthritis/axial-spondyloarthr...