Microeconomic foundation of discrete choice model
Your first equation is an indirect utility function. The consumer chooses only one good and we assume that he can afford it. For simplification, the indirect utility discards the budget $m$ (often assumed be the same for all $i$).
Here, your demand function is perfectly inelastic. If the individual demand would not have been perfectly inelastic, the form would have been like $V=a-s(p)$, where $s'$ is strictly concave and increasing.

See, for example, Palma/Anderson/Thisse.