In Dutch, where the term came from, manie has also been used to refer to obsessive behaviour for at least 700 years. In English, mania has also been used to refer to a frenzy for a long time. The term itself entered the Dutch language through French, not through Greek, where the non-literal use of the word had already got started.
The Greek word may have referred to a specific mental state, but the meaning has shifted over the thousands of years. The Greek word itself is derived from a Proto-Indo-European word for just thinking if Wiktionary is to be believed, cognate with an old-fashioned word for "remembering".