From pg. 39 of All of Statistics:
If $X_1, \ldots, X_n$ are independent and each has the same marginal distribution CDF $F$, we say that $X_1, \ldots, X_n$ are IID (independent and identically distributed) and we write
$$ X_1, \ldots, X_n \sim F $$
If $F$ has density $f$ we also write $X_1, \ldots X_n \sim f$.
Question 1: Why is the primary focus here on $F$ (the CDF) and not $f$ (the density function)?
Question 2: Is it not already the case that $X_1, \ldots, X_n \sim F$ iff $X_1, \ldots, X_n \sim f$? That is, is it even possible that a collection of random variables $X_i$ could have the same CDFs $F$ but NOT have the same probability density functions $f$ (in either the discrete or the continuous cases)?
This is somewhat unfortunate notation, using the same ~ for the CDF and the density.
Every random variable has a CDF, but not every random variable has a probability density function. In particular, a discrete random variable has a probability mass function rather than a density. There are also singular continuous distributions, and mixtures of the different types.