Within a story or lengthy paragraph, an event or description of the surroundings may have taken several sentences to fully cover. That description or account is then summed up with the word ‘that’. So, ‘what with that (summary)’ melds that with whatever follows.