The core problem here is that we really don’t know exactly how the brain learns information or skills. And for what we do know, we don’t have the ability to directly observe when it is happening in the brain. That would be painful and dangerous. So we have to rely on something external to the brain serving as evidence that learning happened.
What we call assessment is really an attempt to create a proxy indicator for what we call learning.
It seems weird to think of it that way; we don't really understand learning so we create tasks for students to complete in the hope those tasks somehow give us some insight into the thing that we don't really understand.