The joke is a pun on the word 'grain'.  The phrase 'going against the grain' is usually said to mean 'going against tradition' or 'against the general standard'.  Going against the grain of wood is usually related to sanding wood down, where it's easier to sand in the direction the lines of the grain on the wood go.
You won ' t often catch loggers or farmers going against the grain .