Those numbers are simply made up, to provide a numerical example to help illustrate the concept. Those numbers don’t apply to all demand functions Please take a look at the sentence right above the equation.

Equation 1 is stating that the demand function can be a function of any number of variables.

Equation 2 is just a simple hypothetical scenario where a linear demand function is presented.

The numbers can also be thought of as sensitvities. -0.4 means that a change of +1 in price will result in a decrease of 0.4 in quantity demanded, all else equal.