Why so many variations for traditional 只 zhǐ (衹/祇/秖/隻)?
To clarify:


只 has two meanings and pronunciations, zhī (single) and zhǐ (only)
隻 is pronounced zhī and has the same meaning as 只 (zhī)
衹, 祇, 秖 all can mean zhǐ (only), but also had other meanings:


衹 has the same meaning, but could also mean 緹 (a reddish colour used in textiles) - hence the 衣 (clothing) radical
祇 also has the pronunciation of qí meanin 地祇, or earth spirits in Chinese folk religion, hence the 示 (divine) radical
秖 is supposed to mean "谷始熟", hence the 禾 (grain) radical



So what you're really asking can be split into multiple questions:

Why are there multiple zhǐ (only) characters?

衹 is the correct one, but due to close similarity with the other characters, they have often been confused for each other. Over time the other forms have become accepted as also having the same meaning.

Just to demonstrate how confusing this can be, the character 祗 is also mistakenly used; it even has a similar pronunciation (zhī). If you haven't noticed, the only difference is a dot below the right part: 氐

One of the goals of simplification had been to eliminate multiple characters meaning the same thing, so it's easy to see why these three were merged into 只 (zhǐ). According to 說文解字, 只 emerged as an alternate form of 衹 as far back as the Song dynasty ("宋人詩用只爲衹字"), explaining why 只 was chosen. But this leads to the next question:

Why did 隻, unrelated and pronounced differently, also get merged into 只?

That's harder to answer as it's one of the controversial aspects of simplified Chinese: 一简对多繁. For whatever reason, in 《通用规范汉字表》 只 was listed as "low risk" (低风险多音字). Probably because the two meanings have different pronunciations and have different grammatical functions, and therefore were unlikely to be mixed up. This is unlike the "high risk" characters like the infamous 干, which has confused computer translators into translating it as "fuck" on many Chinglish menus.

My guess is that they wanted to simplify 隻, a very commonly used character, but there were no good options - e.g. they could have used 支 but it is already a different measure word, which could cause confusion.