Applying curve modifier does not work as expected

In the attached blend file, I can deform a Bezier curve (with 2 splines) with another Bezier curve, using the Curve modifier. It looks fine and as expected in the 3D viewport but when I try to apply the modifier, I get something very different. Am I missing something?

Your curve consists of just two control points, hence the straight line. Subdivide the curve a few times to get the neccessary resolution to give a curve when the modifier is applied

Thanks for the quick reply Richard! I was hoping that applying the modifier would preserve the shape of the modified curve, as seen in the 3D viewport, by adjusting the handles. Which I assume is what happens internally to display the deformed curve correctly in the viewport.