code writers

Any insights into why halachic code writers sometimes decide to just state
general rules, sometimes give one example and other times give copious
examples (see Rambam Mamrim 4:2)?
bsorot tovot
joel rich