According to the definition, if we want to express that there is exactly one $x$ such that $P(x)$, we specify:
$\exists x (P(x) \wedge \forall y (P(y) \rightarrow y = x))$
By Existential Instantiation we can say that $P(a) \wedge \forall y (P(y) \rightarrow y = a)$.
Since we are not dealing with a biconditional, but just a conditional, we cannot infer the following from just the previous statement:
$\forall y (y = a \rightarrow P(y))$
Which is counter intuitive, for we would expect that any $y$ satisfying $P$ would precisely be $a$.
However, we find that there is a more compact definition of exactly one by stating it like this:
$\exists x \forall y (P(x) \leftrightarrow y = x)$
Once again, by Existential Instantiation we can write:
$\forall y (P(y) \leftrightarrow y = a)$
This time implying that $\forall y (y = a \rightarrow P(y))$.
Then... what just happened?
That's right that you cannot turn an implication without other justification. However there is justification here as we have also $P(a)$ in the statement. It's by the axiom of equality you have $y=a\rightarrow P(y)$ due to $P(a)$.