The joke is a pun on the word 'loftily'.  A loft is typically where hay is stored in a barn.  Speaking loftily is to speak in an elevated tone or manner.
It ' s where we store the hay , Tom said loftily .