How would you explain the A natural in bar 11? How would you explain that the phrase ends in bar 11 and not bar 12?
This melody could be harmonised in several ways. But there's a strong implication that from bar 8 the music moves towards G minor, reaching a cadence in that key at bar 14. Hence the A♮ and F♯. G minor chord has two notes in common with E♭ major, which makes the modulation connected, if somewhat novel. (E♭ major to G MAJOR would be a 'Chromatic mediant', another common harmonic shift.)
Here's a version (I imagine the standard version?) that harmonises in this way.
Music doesn't have to fall into 4-bar phrases. This piece has a 4, 3, 4, 3, 4 phrase structure. Nice, isn't it! Musical traditionalists might be tempted to add an extra bar (or perhaps a fermata) at bars 7 and 14 in order to even it out into 'correct' 4-bar phrases. (More so 100 years ago than now, perhaps.) I'm glad this version doesn't.