I'm having trouble understanding why existential instantiation must come before universal in all cases. I can easily see that the majority of the time there is an obvious flaw in the logic if ui is done first. But when the quantifiers are unconnected, and in seperate parts of the hypothesis, i don't see a problem with the order but I am told that it still matters.

EX.
For all x [P(x)->Q(X)] ^ There exists P(x) implies There exists Q(x)

1. P(a)->Q(a) ui
2. P(a) ei
3. Q(a) mp

1. P(a) ei
2. P(a)->Q(a) ui
3. Q(a) mp

I just don't see the difference in the order of ei and ui when they aren't in the same section of the hypothesis. (They're only connected by an and)