This has similarities to other answers but it represents a complete solution, thus I'm posting it as an answer rather than a comment. Also, please forgive the poor writing of it.
The magic of the transformation could be linked to competence of using it and to organic materials. I will elaborate on this below and hopefully it not only solves the question but provides some extra narrative ideas.
The definition of self is inherently vague, so it's difficult, even before you get to clothes, to be clear on what is part of the organism that transforms and what isn't. For example, does the outer skin layer count? It consists of dead cells. You might argue that the genetic material matches, but it may be slightly mutated, much like the cells of another similar organism might be. What counts as the organism's self in this case? What's the threshold of difference that makes it count as part of this organism versus belonging to something else or nothing at all? Also, what about dust, contaminants (water, airborne chemicals etc.), the air in the organism's lungs (if it has them) and other surrounding materials? What about a severed arm?
We can take advantage of this vagueness and solve it at the same time by specifying that the magic has an origin point and its effect has a shape and/or radius, including some things and excluding others.
Organic chemistry has priority
If you can decide upon the origin of the magic itself (which perhaps should be answered anyway considering that you need to explain why magic is part of some humanoid species, but fish or whales can't use it, nor can plants - and if they can, why don't rocks have it?), perhaps some internal organ or structure that allows control of it or contains it, the position and characteristics of that origin can determine how it operates on its surroundings.
My preferred idea on this is that, assuming magic is:
- propagated as a form of energy
- it's medium is matter
- it interacts strongly with matter
- it can be controlled consciously
you get a substance that permeates the organism's body and the organism has control of it because it has control of the origin of it. The substance acts based on the directives of the organism, thus it can arbitrarily act or not act on certain kinds of matter, or more practically, certain chemical compounds in this case.
Assuming the performance of magic depends on its origin, that could explain why affecting organic compounds is so much easier (because its shape or character is affected by how it's generated or contained) and the relative vagueness of what counts as an organic compound can be addressed by a similarity metric. In this case, a single carbon atom counts as an organic compound, but it is strongly dissimilar to the compounds in the shapeshifter's body, thus making pure carbon compounds difficult to absorb, while still allowing trace metals and other chemicals included in the body naturally to be included.
If the purpose of transformation is to alter the physical body, which is almost entirely organic (there are trace heavy elements and other non-organic parts of the body) then the owning organism can simply choose to expand the radius of the magical effect to other surrounding materials. How far it can extend this radius would be determined by its own competence in controlling the magic and how much magic it can control at once.
In order to include clothes, it can just expand the effect to include them. If it is substantially easier to affect organic materials, that automatically makes taking jewelery, metallic weapons (even those with a lot of carbon impurities, mouldy rust or alloys that include carbon), coins etc. very difficult, but it means that a papyrus scroll or a cake would be easier to include.
The quantity of magic the user has available to them (which can be determined by how much they can contain within themselves or define the origin as a conduit with a specific capacity of magic flow, which effectively determines how much magic is usable at any one time - in the latter case, magic would require maintenance so if the organism loses consciousness, they transform back to a human or a default state or something very bad happens) determines the extent of the transformation.
The origin being a flow conduit also constrains how much magic a user can control at one time, even if they can absorb it from their environment. Even if they are surrounded by abundant amounts, they can only use a limited amount at any one time due to flow capacity constraints - it would still present an advantage as far as how long they can remain transformed for instance.
This means you technically can include a library with your transformation, or a stack of clothes, but the cost of transforming with them is prohibitive, making it impossible.
This also means that the mass of whatever you include must be accounted for. Including your clothes while transforming into a bear isn't going to matter much (it may be an advantage) but if you transform into a bird it's a bit more problematic. You could allow some small degree of control over the mass of the transformation, so that these effects are mitigated (and so you can explain why some transform into more or less massive forms and why some transform into larger or smaller versions of existing animals, due to mass constraints), but including this allows for an easy explanation for why the shapeshifters don't transform with an army, fly like a bird to the target location then unload them from their bodies.
Convenience of scale for the shapeshifter's body
Since bodies contain enough non-organic compounds and since clothes are apparently a standard inclusion in transformations in your case, an explanation is warranted for why shapeshifters have enough magic or control over it to manage the low efficiency of transforming these parts.
If you assume that the origin of their magic is some organ, that has evolved with them or has been implanted genetically (or magically), you can hand-wave the scale of magic allowed by claiming that the organ naturally has the capacity for a full-body transformation because it evolved to exactly that capacity or was intended to be capable of that much. Those who are experience in shapeshifting are more efficient, thus the small excess of magic they are left with can be used for clothes.
Convenience of complexity
Assuming the shapeshifting is under the control of the shapeshifter, this implies that control is required to return to a previous form or properly transform in the first place. The original body of the shapeshifter being already too complicated to have a full conscious grasp of, it would be required that they already have some natural, unconscious imprint of their original form or at least animal or organic forms. This information could be contained within the origin of the shapeshifting capability itself.
This allows excluding complicated objects from being absorbed during transformation, as it would be difficult or impossible for the shapeshifter to return them to their original form. A book, for instance, wouldn't be written, but just a collection of paper - it might look like a book, but its written contents would be wiped or distorted. Forgetting to restore the form of object the shapeshifter has absorbed may cause them to incorporate the mass into their own body, inadvertently producing more bone mass, longer hair, a tumor, a full bladder or a different object altogether.
Clothes, being organic (most of the time, at least) and relatively simple, may be restored relatively easily by comparison, as could a particular hair style or scar.
Since this is a magical transformation, we can assume that the heat absorption or production from the transformation can be ignored, even though it would be significant for a change of this scale in a small period of time under natural circumstances.
However, control may not be optimal by the shapeshifter, producing excess heat that damages or burns their clothes as they transform (amongst other effects, such as heat stroke that they might suffer). This can be an excuse to have clothes sometimes be discarded by less efficient shapeshifters or have them accidentally destroy them, requiring a new set later.
Caveats of this approach
Grounding the origin of shapeshifting and its rules in such naturalistic mechanisms will invoke the question of the origin of magic. Is it natural? Then why isn't it ubiquitous enough that all organisms have these capabilities? If it's an organ or other internal structure that makes shapeshifters special and it has naturally evolved, why hasn't it happened to other organisms? If it's artificial, whoever did it should have control over magic, either intrinsically or through artificial means - so how did they come about those means?
A long series of questions can be asked which makes using "magic" as the explanation seem pointless (it is, after all, the quintessential have-wave - if it doesn't do away with explanation, why use it? :P) but this approach may inspire you to provide an explanation that seems deep enough that whoever reads your story will be satisfied enough :P