In the context of fluid mechanics, how does the Bernoulli equation contribute to the understanding of fluid flow behavior in mechanical engineering, and what are the critical theoretical aspects that must be considered when applying this principle to various fluid flow scenarios?