Textile fabrics are made out of cellulose fibres, that can be derived from cotton or bamboo. As far as I know all grasses contain cellulose, so why are only a few grasses used? What makes them so special? Why could you not use for example gamba grass/andropogon gayanus for that, which contains 30% cellulose and 21% hemicellulose (http://www.lrrd.org/lrrd20/2/oded20027.htm)? Any insight on that would be very helpful
A large part is the agriculture behind the fabric and what the industry and customer demands. Cotton and bamboo are easy to farm because we have a lot of experience and techniques for raising and harvesting and processing the plants and fibers ( especially cotton, which is available as GMO round-up ready to simplify weed control, and centuries of breeding for better quality and quantity of fiber ). Additionally, the textile industry has machines that are calibrated for cotton, other plant fibers may not work as well and re-designing the machines would be expensive. Customer demand is important, and customers are used to cotton clothing.
As far as chemical reasons go I don't have a lot of specifics. However, different plants have different compositions of fibers. Though all plant fibers are mostly cellulose/hemicellulose, lignin is also important, and would make for woodier, stiffer, tougher fibers ( though bamboo gets pretty woody, I don't know much about bamboo textiles ). Other plant fibers may contain pigments that would have to be bleached out before it could dyed with other colors. Length of fibers is also important. Shorter fibers would be harder to work into threads and textiles.
And keep in mind that the textile industry is not limited to cotton and bamboo. For centuries, cotton was a luxury material because picking the seeds out of the cotton boll was very hard work, cotton was far more expensive than silk. The widespread adaption of the cotton gin ( and slavery ) made cotton cheap and easily available. Prior to this, fabric would have been made from flax to make linin, or from hemp. Flax and hemp are still commonly grown for fabric. ( and we haven't even mentioned animal sources of fiber such as silk or wool )
Chemically, many long chain molecules can be converted into textile fabrics. A textile fabric can be made from milk because milk has long proteins. Because the molecules or groups of molecules are so long, each type of can have a vastly different chemical makeup and construction. Fibers of wool are scratchy, synthetics have smooth fibers, some fibers absorb water, while others are impervious to water. The chemical makeup of a fiber has some impact on whether or not fabric is made from it; however, the significant impact is from economics.
If a market full of buyers willing to pay more for gamba grass fabric than it cost to produce the fabric, then the textile industry would make gamba grass fabric. Milk takes many resources to produce a weak fabric, so it is unusual to see a fabric made from this material. Bottom line, textile producers are looking to make money. If money is to be made then so will the fabric.