Help understanding definition of expected utility function
That's true, but it should be constructed the other way round: The assignment of numbers $u_i$ to outcomes is not given by the Bernoulli utility function but defines it. The terminology of Bernoulli and Von Neumann-Morgenstern utility functions is common, but not universally used in the context of EUT.