The mesh should cover more of the curve but it is shorter

Hi all! Has anyone had experience working with a curve modifier?
A cube at the beginning this marks the end of the mesh. But for some reason it does not reach this mark and is shorter than it should be initially (circled version)
Why does the mesh get shorter on the curve?