Why is the subscription header closed but the lines are still active?

That's because you can mark certain lines of a subscription to close in the future. The lines remain open while the header can be closed by the user.

Let's look at an example:

A subscription exists with these dates: 01-Jan-2023 to 31-Dec-2023

The subscription has 100 lines -- L1 to L100.

You want to close line L100 on 1-DEC-2023 (in this example it's a future date) and close all other 99 lines on, say, 31-JAN-2023 (a past date in this example).

You can future-close L100 with a close date of 1-DEC-2023. The status of line L100 status will still be active, since it's future-closed.

Now you can close the header with a close date of 31-JAN-2023 (a past date). This sets not only the header status as closed, it also sets a closed status for lines L1 to L99.

Because the subscription header is just used for defaulting, and all executions happen at the product level, this scenario works fine. This means, however, that in this case, you should do any reporting at the product line level instead of at the header level.