Grammarians do say it's best not to end a sentence with a weak word, and prepositions are considered weak words. However, a preposition may properly end a sentence where a reconstruction that buries the preposition inside the sentence violates the idiom. Take the sentence "Where is the girl from?" To take "from" from its terminal position and put it elsewhere grates on the ear: "From where is the girl?" Or take the sentence "I have no idea what it's about." Putting "about" within the sentence, "What it's about I have no idea" is unnecessarily stilted. Then there's Winston Churchill's old chestnut after being chided about ending a sentence with a preposition: "This is the type of arrant pedantry up with which I will not put." I've always loved this one.
.
I've been also told that English is the language of exceptions. I'm with you in this.