The "Hindu" caste system results from the history of social hierarchy in the Indian subcontinent. What you are calling "Hinduism" is a relatively recent construct that has emerged as a response to religions with more centralized/uniform doctrines and institutions. There are belief systems categorized under this "Hinduism" label that overtly reject caste systems (and have done so for centuries), while others overtly uphold it.
Other societies also have caste systems, just differently rationalized than the one present in some belief systems that fall under the "Hindu" banner. I'm not excusing any of these systems whether Hindu or not - they are all a blight on humanity - but they are also a feature of many societies whether or not they use the particular term "caste".
Some clear examples of excluded/oppressed castes outside of the South Asian context are the Burakumin in Japan, the al-Akhdam in Yemen, and the Mestizos with more indigenous ancestry in Latin America.
The existence of caste systems outside Hinduism doesn't change this either.
Some objects are red in and of themselves, while others can be made red by something outside them. Likewise, some beliefs cause people to act in certain ways, while other people may act in the same ways tangentially to, or even despite, their belief.