When you want to get the dimensions of a video file, you probably want the display aspect ratio. Using the dimensions of a stored frame may result in a stretched or squashed video.
However, some formats (ex., HDV, DVCPRO HD) use non-square pixels internally for image storage, as a way to reduce the amount of data that must be processed, thus limiting the necessary transfer rates and maintaining compatibility with existing interfaces.
Actual displays do not generally have non-square pixels, though digital sensors might;
TLDR; some formats use non-square pixels for reducing file size, some digital sensors has non-square pixels.
Wikipedia to the rescue:
TLDR; some formats use non-square pixels for reducing file size, some digital sensors has non-square pixels.