Diatonic function is like a roadmap for music. The notes in music are like letters, and when you put them together the right way, they can make meaningful words. When you look at a song, the notes are like the map and the words are like the different places you can go. Diatonic function is like following that map, so that all the notes you use in your song make sense together and will take you to creative and interesting places.