It's a derogatory in reference to the fact that poor Mexicans eat a lot of beans. Another food-related Mexican derogatory is "taco-bender".
taco bender... hadn’t heard that one in a while.
a couple of months back i’m grocery shopping with my family. my wife is reading off the list of things we still need to get. she reads out loud “beans.. ok... we need beans”. my 4 year old shouts “YEAH, CUZ DADDY’S A BEANER!!!”