The density of beta distribution is given by the following
$$f(x\mid \alpha ,\beta ) = \frac 1 {\operatorname{B}(\alpha,\beta)} x^{\alpha - 1} (1 - x)^{\beta - 1}$$
where
$$ \operatorname{B}(\alpha,\beta) = \int_0^1 x^{\alpha - 1} (1 - x)^{\beta - 1} \,dx $$
is the Beta function as the normalizing constant.
I understand one use of Beta distribution is to draw random probabilities from it. I am interested in what gives rise to this distribution? In particular, why it is "$x^{\alpha - 1} (1 - x)^{\beta - 1}$", not something else? What kinds of desired properties uniquely determine this density? And how the density formula is derived?
I have googled but could not find a good explanation. Many text books just throw this in front of you like it comes from nowhere.