The world's most globally distributed Indian food began as a Central Asian meat pastry. It entered India in the 13th century, became vegetarian under commercial pressure, and is now found on every continent where Indians have settled.
The samosa's ancestor is the sanbusak — a half-moon fried pastry with minced meat, documented in 10th-century Persian cookbooks. It travelled the Islamic trade routes from Central Asia through Persia to India, arriving by the 13th-14th century. Ibn Battuta, visiting the Delhi Sultanate in the 1330s, describes being served samushaks — meat-filled pastries fried in ghee — at the court.
The original Indian samosa was a meat preparation. The shift to potato filling happened in the 19th-20th century, after the Portuguese introduced the potato in the early 17th century and after potato became widespread. The potato samosa serves the widest possible customer base — accessible to Hindus, Jains, and all vegetarians. The meat samosa still exists in Muslim food traditions as the keema samosa.

Both entered India through Muslim food culture. Biryani remained primarily meat — the vegetarian biryani is a concession, not the standard. The samosa, however, became primarily vegetarian. The difference is the filling: biryani's meat is the central element and cannot be easily substituted without changing the dish's nature. A samosa's filling is a small quantity enclosed in pastry — substituting potato for mince changes the filling without changing the format. The samosa's vegetarian transformation was a commercial adaptation; biryani's persistence as meat is a philosophical position.