The first "it" is a demonstrative; the second is used for "things" (in general). This sentence could be reformulated as "All night. That's just how things are done".
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.