It probably was sugar. They shipped flour in similar cars, and granulated sugar isn't as messy.
As for contamination, they made commercial seals for both the hatches and the gates. They weren't used much on grain, as evidenced by the number of piles of grain in Pasco Yard in the 70s, but were common on finer materials, or those needing more protection.