How can head-direction cells represent all possible orientations when they have preferred directions?

Why should they be? The HC/EC is full of various spatial representation cells.
Border, head direction , place, vector to objects, distance to objects.
BioRXiv is full of papers describing cells with various specialized properties.

See the Moser video embedded in this HTM school video. It also show cells with different receptive fields voting to make a better estimate of some value.

See vector cells here and see my take on how grid cells vote to form place cells in the thread above it. Look at the range of angle sensitivities listed in this paper. It is certainly not exact values.

I see the sensed local patterns in the local group of cells being the raw ingredients for the various forms of representation. Connectivity is key here.

Here is where I differ from the Numenta canon: Numenta places the grid cells at the level of the single column, I place is in groupings of columns. I see that my take does fit with what I have been reading, but Numenta is working on how the TBT will do the same thing. I will wait to see if they can seduce me away from my viewpoint.