The match data is only generated from the rank lists. So if someone was still undecided as an M4, and interviewed in Anesthesia, Psych, and Ophtho but in the end only ranked Anesthesia programs (I know someone who did this), there is no record of their prior interest in Psych/Ophtho. It's been a while since I went through the Match, but the ERAS data would capture some of this, but probably still has holes in terms of who actually completed interviews - particularly late in the season ones when everyone is tired and cancels last minute through email...unless invites/scheduling/confirmations/cancellations go through the ERAS system these days.
IIRC, some of the data analysis uses the idea of "desired specialty" which is based off of the specialty ranked first. Useful when evaluating candidates going into competitive fields who subsequently rank a second specialty as a back up. This assumption that the desired specialty occupies the #1 position on the ROL is a logical conclusion if everyone follows instructions and simply ranks the programs in the true order they desire. But given the number of threads on SDN where people seem to choose against their true feelings, it probably ends up introducing a small degree of bias/uncertainty into the results of the data analysis (not the fault of the NRMP though).