Usually, if we have a state $|\psi\rangle$, and have to measure an observable $A$, then all we do is expand $|\psi\rangle$ in terms of the eigenvectors of observable A, and then the probability of measuring an eigenvalue is basically $|\langle u_i|\psi\rangle|^2$ where $|u_i\rangle$ is the eigenstate of $A$. Basically, it is possible to write down the eigenvalue equation $A|\psi\rangle = a|\psi\rangle$.
What if we are given a state $|\psi\rangle$ explicitly in a problem (say, we had $|\psi\rangle = (6, 3i, 4+5i)^T$) such that it can never be written as an eigenvalue equation for an observable $A$? How would we measure the observable for that given state, then? Most of the time, if a state is given explicitly, it's usually that it will be a superposition of eigenvectors of the given observable to measure. What if it isn't?
In short, we can only use $|\langle u_i|\psi\rangle|^2$ if $|\psi\rangle$ can be written as a superposition of eigenkets of $A$. What if $|\psi\rangle$ is such that we cannot write it as a superposition of the eigenkets of the observable we wanna measure?