Your bdnf and your endorphins are both some kind of hormonal, mechanical things that happen inside your brain and they make you feel good, and you can probably research more about them if you want to, but it's good to know that there is more than one factor at play here.