Why are so many lines inserted?

You will have to delete all the empty rows in the sheet if you use ARRAYFORMULA in a form. The reason is that the cells that are calculated by ARRAYFORMULA are considered non-empty by Glide, and hence the next row is inserted only after whatever rows are present in the sheet already.

Ref: Check the “Edit” note in the first post in the thread below.