Bernoulli's equation:
$P+\frac{1}{2}\rho v^2+\rho gh=\text{constant}$
There are some conditions to use Bernoulli's equation. But often we neglect them.
The fluid must be incompressible. But we use this equation in many cases where the fluid is air, such as to find the lifting force on the wings of an airplane (image below), to describe how a hurricane rips a roof of a house off, to measure the speed of an air current (using venturi meter), etc. Though as far as I know, air is compressible.
Bernoulli's equation is intended for laminar flows. But we apply this to turbulent flows assuming them to be laminar flows too (e.g. wind).
The word 'incompressible' implies that the density is uniform throughout the fluid. Then consider the following image which shows a tank containing two liquids with different densities: It does not matter whether we apply Bernoulli's equation to AB streamline or CD streamline, the result for the exit velocity will be the same$\star$. But according to the conditions, we can apply the equation to a streamline going through one fluid.
If so, why are such conditions imposed?
$\star$ To elaborate 3$^{\text{rd}}$ point
Applying Bernoulli's equation to points A and B:
$$\small{\color{red}{(P_{\text{atm}}+h_1 \rho _1 g)} +\color{green}0 +\color{blue}{\rho _2 gh_2} = \color{red}{P_{\text{atm}}} +\color{green}{\frac 12\rho _2 v^2} +\color{blue}0}$$
Applying Bernoulli's equation to points C and D:
$$\small{\color{red}{P_{\text{atm}}}+\color{green}0+ \color{blue}{(\rho _1gh_1 +\rho _2gh_2)}= \color{red}{P_{\text{atm}}} +\color{green}{\frac{1}{2}\rho_2 v^2} +\color{blue}0}$$
$\small{\text{$h_1$= height of the upper liquid}}$ $\small{\text{$h_2$= height of the lower liquid measured from the level where liquid exits}}$ $\small{\text{$\rho_1$= density of the upper liquid}}$ $\small{\text{$\rho_2$= density of the lower liquid}}$
Obviously, values for $v$ from these two equations are equal!