In histology, retractable needles are primarily used for obtaining tissue samples through procedures such as fine-needle aspiration (FNA) and biopsy. These techniques involve extracting cells or tissues for microscopic examination to diagnose and study diseases. The retractable feature ensures that once the sample is collected, the needle can be safely retracted, protecting healthcare workers from accidental injury.