Thanks for the examples!
I found that the gene ids that were in neither HUGO nor DAVID are all obsolete -- some of them were gene models that were later found to be invalid (eg 100126476, 105379398, 105371162), and the other were replaced by other gene ids (eg 84849, 117153, 400863). In other words, they have been removed from the new gene lists from NCBI. The gene ids that were in HUGO but not in DAVID seemed normal; I don't know the strategy of HUGO on selecting genes but it apparently doesn't use all the NCBI genes.
The inbuilt annotations in the Subread package seemed a little old, although the analysis results should not be largely different if the latest NCBI annotation is used.