I get screamed at for doing that at some gas stations. I have a few metal 5gal surplus jerry cans that have been re-lined with epoxy that they scream at me about too, since they're painted OD Green.
If someone at the station gives me shit about it, I stop filling up, and tell them "Thank you, I'll be taking my business elsewhere from now on." Then I drive across the street to the next station and fill up there.
Did you know that transporting more than 10 gallons of fuel in gas cans falls into HAZMAT? You can get into serious trouble for moving HAZMAT without a license, and without notifying the DOT.
Move it across state lines for use within another state, and you've committed tax-evasion too.