How do analysts think about functions with poles at all roots of unity? In branches of algebra impinging on the enumeration of partitions, one often encounters formulas like
$$\prod_i \left( \frac{1}{1-q^i} \right)^{n_i}$$
for some integers $n_i$.  E.g., with $n_i = 1$, this counts partitions, and with $n_i = i$, plane partitions.  
Such formulas are usually understood as formal products, but if you tried to take them seriously as analytic functions, you would be thinking about functions with poles at all roots of unity.

Is there a branch of analysis which studies such functions?  Does that theory have consequences in combinatorics?

(I don’t know even enough analysis to know what tag to put.)
 A: One general warning about interpretation as analytic functions: 
Just because an infinite product formula looks like it tells you where the zeros and poles are, it might not work the way it does for finite products.
For example, we can consider a similar-looking infinite product
$$\prod_{i\geq 0}\frac1{1+q^{2^i}} = \frac{1}{1+q+q^2+q^3+\cdots} = 1-q,$$
which looks like it should have poles at all $2^i$-th roots of -1, but in fact it doesn't have any poles in its analytic continuation.
(My apologies if this was already understood -- is there a less-obvious reason for the claim about having poles at all roots of unity?)

One analytic result about such combinatorially-inspired functions is the Polya-Carlson theorem, which gives a surprisingly strong dichotomy:
if a power series $f(q) = \sum_{n\geq 0}a_nq^n$ has integer coefficients and radius of convergence 1 (so it defines an analytic function on the open unit disk), then either 
a) the function cannot be analytically continued past the unit circle, or
b) the function is rational, of the form $f(q) =\frac{g(q)}{(1-q^m)^n}$ for 
polynomial $g(q)$ and
$m,n\in \mathbb N$. 
