I am a beginer in learning French. I came to see this sentence somewhere.
"La cravate" - The tie.
I am curious why 'the tie' is a feminine word?
I'd wager that's because in French, baring other factors (e.g. certain suffixes), nontechnical words whose pronunciation ends in /-at/ tends to be strongly feminine. If that specific sense was borrowed from German, it's probably borrowed in the same gender (Krawatte is also feminine in German).
It's however not entirely clear what the sequence of borrowing was (it's ultimately from Croatian hrvat, which also gave, well, croate).
Otherwise, this is really threading into the most arbitrary aspect of language (especially if you're gonna follow this up with "why are words in /-at/ feminine?"). Asking "why does this language function differently" is typically not much more useful a question as asking "why do different languages exist". French has grammatical gender. No matter what the word is, if it's a noun, it's going to have a gender, and this sort of categorization is going to have some level of arbitrariness by definition.