Origin can be found in British History
The Jack alluded to is in fact reputed to be Charles I and Henrietta Maria, his Queen. Apparently, when King Charles declared war on Spain, parliament refused to finance him (leaving him lean!) So his wife imposed an illegal war tax (to get some fat!) after the angered King dissolved Parliament. The first publication date for the lyrics of this nursery rhyme can be traced to 1639.