Normally such a line would mean that the connected notes belongs to the same melodic line. Sometimes a melodic line changes hands because of technical reasons making it difficult to play the line in one hand, usually because other things are also supposed to be played with that hand. Then the marking indicates where the melodic line is continuing. But here it is a bit weird, because if the note F belongs to the melodic line in the right hand why is it then written in the left hand when at first glance it seems as if the F could easily be played by the right hand?
I have Mikrokosmos in front of me here, and there is no explanation in the book. But by using some logic I have a qualified guess:
In each hand there is only one hand position, 5 notes which fits one position.
If the note F in the left hand was written in the right hand you would need to exceed your right hand position. By writing the F in the left hand you can keep both hands in their position. I can't find any other useful explanation than that. Note that Bartok in this work (Mikrokosmos) is very careful about hand positions.
For those who don't understand the idea with hand positions here is an image. As you can see there is an indication showing which notes appear in each hand in this piece. Five notes for each hand which also indicates one position for each hand. In Mikrokosmos, Bartok is very careful about the hand positions, especially in volume 1 where the beginner's pieces are.