Welcome to the Piano World Piano ForumsOver 2 million posts about pianos, digital pianos, and all types of keyboard instruments
Join the World's Largest Community of Piano Lovers
(it's free)
It's Fun to Play the Piano ... Please Pass It On!

That's because it is supposed to be played legato. Legato is Italian for "bound". Hence it marks a smooth connection of the notes, no open space between them. The lines are called slurs.

The sheet music in your pictures has two slurred series in the treble part. The notes in each series are played legato. After the D in the first series there is a slight space/breath before you repeat the same notes played legato.

Niva, part of your confusion may be due to the fact that the same symbol is used to mean two separate things. When that symbol joins two SAME notes, then it is called a tie, and it prolongs the length of the note. When it joins several notes, it means legato, as explained by Akvaran. Your music also indicates phrasing, like when you tell a story in sentences with pauses between commas, and larger pauses after periods. Trying hearing the phrases as you work through the piece, and see whether it makes you want to play it that way. This is something that helps me.