“... and David’s sons were priests.”
Hmm. That would seem to require an explanation, no?
God had chosen the tribe of Levi to serve him as a priestly caste. Even then, not all Levites qualified to serve as priests. Service at the altar was limited to the sons of Aaron, Moses’ brother, who were ordained in an elaborate ceremony and served in that capacity thereafter.