Derek had always hidden behind an emotional wall to protect himself since Kate. And rightly so, look what loving means: he lost his family, was used by the Darach and now has given up his Alpha Spark for Cora. Stiles couldn't let him go without telling him how he feels for Derek. Both find that their unrequited love isn't as unrequited as they thought. It is now up to Derek if he is willing to give love another shot. Whatever his decision it sets them off on a new chapter of their lives.