It is a single object, imagine a straight line, the length of which is fixed, but the rotation of each point needs to follow a path. After Effects however only works with a single anchor point so in the end only one end would rotate.
Let me show you an example: Rear is attached to path, front is not.

The Goal: to have both attached to the path:

Hope this helps.