"Is there any theory that says if you are going to find two functions, you need to[sic] conditions, and then you are ok?"
No. You do need two conditions if you want to uniquely define $u_1'$ and $u_2',$ but there are two possible things that can go wrong even if you have 2 conditions. One is that the second condition, together with the condition that $y_p$ is a solution, is too strong and there are no functions $u_1'$ and $u_2'$ satisfying both. The other is that the two conditions together are not strong enough, meaning the condition you chose was redundant, so you will need to choose another condition in order to get your $u_1'$ and $u_2'$. By choosing the condition $u_1'y_1+u_2'y_2=0$, you get it "just right": you can find $u_1'$ and $u_2'$ and these this will be the pair of functions satisfying both conditions (then you can find $u_1$ and $u_2$ from these by integrating). This is all linear algebra, but with functions in place of numbers (the variables are $u_1'$ and $u_2'$, the coefficients are $y_1$, $y_2$ and their derivatives).
The condition $u_1'y_1+u_2'y_2=0$ isn't the only condition that will get it just right, but it is among the simplest, and it makes the rest of the derivation simpler too (this simplicity is even more helpful in the generalization of the technique to higher order DEs).
It's not bad if $u_1'$ and $u_2'$ are not uniquely determined for some particular case, but we want a technique that will work for any non-homogeneous linear 2nd order DE when we know $y_1$ and $y_2$. The condition $u_1'y_1+u_2'y_2=0$ gives that.
Now let's consider your preferred choice that either $u_1=0$ or $u_2=0$. If that's the case, then $y_p=uy$ where $u$ is some real function and $y$ is either $y_1$ or $y_2$ (I'm omitting $(x)$'s to reduce visual clutter). Then
Substituting these into the DE gives
The functions $p$ and $f$ are known, and since $y$ is known, so are $y'$ and $y''$. Thus we have a 2nd order non-homogeneous linear differential equation with dependent variable $u.$ But that is the type of DE we are trying to solve in the first place, only with a different dependent variable. What do we do next? (I don't know).