Well, we know that if we blow up a point in a smooth variety, then the exceptional divisor is a projective space and its normal bundle is $\mathscr O(-1)$. This means that when you blow up a cone, the exceptional divisor is isomorphic the original smooth variety which is naturally embedded in the exceptional divisor of the blow up of the affine space which is the cone over the original projective space. So the normal bundle of $Y$ in $B$ is the $\mathscr O(-1)$ corresponding to the original embedding of $Y$ you started with.
Finally, this shows that this works for the canonical bundle of any Fano variety. Your example appears as the resolution of the cone over the $n+1$-uple embedding of $\mathbb P^n$ which happens to be given by the global sections of the dual of the canonical bundle, but the fact that it is the canonical bundle has not much to do with this.
The rest is a response to the additional question in the comments below.
Remark. The following statement is somewhat related to the above problem:
Lemma Let $Z\to \mathbb P^n$ be a $\mathbb P^1$-bundle with a section $E\subseteq Z$ and assume that there exists a proper birational morphism $\alpha:Z\to X$ such that $\alpha$ contract $E$, i.e., $\alpha(E)$ is a point and $\alpha|_{Z\setminus E}$ is an isomorphism. If $X$ is normal and factorial (i.e., every Weil divisor is Cartier), then $X\simeq \mathbb P^n$.
This is an intermediate statement in Mori's proof of Hartshorne's conjecture, see Kollár's book on rational curves.
So, this implies that if $Y=\mathbb P^n$, and $X$ is not the affine space $\mathbb A^{n+1}$ (which happens if $Y$ is embedded as a linear subspace), then $X$ cannot be factorial. The easiest examples of non-factorial singularities are quotients by finite groups. Furthermore, if $Y=\mathbb P^n$ or more generally such that $\mathrm{Pic} Y\simeq \mathbb Z$, then the local class group of the singularity of $X$ is a finite cyclic group (the point is to realize that it is torsion and generated by a single element). This implies that there is a finite (non-flat!) cover of $X$ which is factorial. One could argue that then it is not surprising that we would find finite quotient singularities among these.