People used to use strips of bark or sticks, also known as "stocks," with marks on them to indicate how many goods they wanted to buy. But, people could easily cheat by either adding new marks or rubbing out old ones.
So, people started splitting the stocks in two, right up the middle, and each person (seller and buyer) would hold on to one stock. The stocks could then be put together to see if the marks matched.
People holding the stocks became known as "stockholders," a term we still use today.
Source: The Great Courses DVD, Zero to Infinity: A History of Numbers, Professor Edward B. Burger, Lesson 2, The Dawn of Numbers.