Definition of line bundle associated to a Cartier Divisor.

Let $$D$$ be a Cartier Divisor on a scheme $$X$$ represented by $$\{(U_i, f_i)\}$$ where $$U_i$$ is an open cover on $$X$$, $$f_i \in \Gamma(U_i, \mathcal{K}^*)$$ and such that $$f_i/f_j \in \Gamma(U_i \cap U_j, \mathcal{O}^*)$$.

We define the sheaf associated to $$D$$ denoted by $$\mathcal{L}(D)$$ to be the sub $$\mathcal{O}_X$$-module of $$\mathcal{K}$$ generated by $$f_i^{-1}$$ on $$U_i$$.

Why take the inverse here?

It seems that $$D$$ as described already is a line bundle via the map $$\mathcal{O}_X \vert_{U_i} \to \mathcal{D} \vert_{U_i}$$ defined as $$1 \mapsto f_i$$.