I wondered whether the not-obviously-real output of roots(QQbar) were related to the cause of the but, too, but I have seen other polynomials with all real roots for which roots(QQbar) gives one or several roots that instead of showing as exactly real are displayed with an imaginary part that is zero to within the given precision, but for which roots(AA) correctly identifies them as among the real roots.
Here by the way is how this problem manifests as an assertion error even when simply checking whether two algebraic reals are equal:
P.<z> = QQ[]
poly = z^8 - 32*z^7 + 425*z^6 - 3044*z^5 + 12789*z^4 - 32090*z^3 + 46672*z^2 - 35734*z + 10917
rootlist1 = poly.roots(AA)
a = rootlist1[-1][0] - rootlist1[0][0] - 9; a
rootlist2 = poly(z=9 - z).roots(AA)
b = rootlist2[-1][0] - rootlist2[0][0] - 9; b
a == b