It was basically explained in the movie. They were obviously very close friends who had some feelings for one another which is covered when the king speaks to her telling her to not get caught up with Legolas because nothing would come of it. When the gates are sealed Legolas decides hes going...