It's interesting to track the evolution of Emil's perception of Max Demian in 'Demian', because it's basically the roadmap of Emil's own development. At the start, Demian is just this weirdly confident new kid, a figure of mystery and a little bit of fear. Sinclair is still stuck in this childish, black-and-white worldview, this 'world of light' his parents gave him, and Demian's comments about Cain challenge all that. He's a source of unease.
That shifts dramatically after the stolen-goods incident, where Demian essentially rescues Sinclair from Kromer's blackmail. Demian becomes a protector, a savior even, and Sinclair starts to idolize him. The relationship isn't really friendship as a kid would know it; it's more discipleship. Sinclair hangs on every word, trying to decode Demian's cryptic philosophies.
By the end, after they've parted and reunited, Demian isn't a person to Sinclair anymore, not really. He's a symbol, a guidepost, a representation of Sinclair's own emerging self. The final, ambiguous lines about seeing Demian's face in his own reflection show the total internalization. Demian ceases to be an external 'other' and becomes the voice of Sinclair's own soul, his 'destiny'. Hesse nails that feeling of how mentors in youth eventually get absorbed into your own psyche.