There are 2 questions here. One -- can/does the physical food change from
Kosher to non-kosher? To which the answer is no. Once something is Kosher
it remains so.
The second question - "purchase cannot be contrary to Halacha?" is true
that one may not make a blessing on the food if an avairo [sin] was done
with it -- such as stealing it; but the food itself still remains Kosher.
Using a dollar bill with a picture of someone you don't agree with does not
constitute a sin -- and affects neither the food nor the blessing.
Regards,
Danny