A study can have a closet. Some do, however often they do not. What differentiates a bedroom from a den? Septic permits aside, since many homes are on sewer , what makes a room a den vs a bedroom?
TYPICALLY, in most markets, it is the whole package, placement in the floorplan as well as finish, privacy, etc. It's not just about a closet or any one thing, but a number of factors in total results in a room that looks, feels and functions more like a den, or more like a bedroom ( and thus is market accepted as such))
A bedroom is expected by buyers to have easy access to a bath, location away from noise and egress of common area rooms, a door that fully closes for privacy, and modern expectation is for a closet. ( and a window). Whereas a den is often located near the front or perhaps a rear kitchen area wing of the house, aka near common area rooms. It often has an open fourth wall, or partly open wall, or french doors. It may have a closet, but often does not have one.