Same purpose - they are all walking surface coverings - but different cleaning tools and methods are applied for different surfaces.
Carpets and rugs can be divided into those that need to feel soft underfoot, perhaps in a bedroom, and those that need to be tough and resilient for heavy footfall, such as in a commercial building. To some extent, cleaning and protection is the the same for both types. (carpet cleaning information)
Floors - soft wood, hard wood, laminate, vinyl, ceramic and so many more options, mostly hard-wearing but protection of some surfaces would be wise, e.g. wood floors, marble and travertine. Wooden flooring benefits from being 'fed' to renew moisture that may be removed during harsh cleaning, Travertine easily retains dirt and should be sealed immediately.
Outdoor flooring - driveways and patios - are difficult to protect from environmental damage - weather and weeds are the most common problems. Again, there are many different surfaces, from various types of paving to concrete and tarmac, most are cleaned with power-jet sprays of plain water. Cleaning these areas can be time consuming if they are large and all cleaning becomes more difficult as the surface deteriorates. Block paving can be sealed to help prevent weather and weed damage; tarmac may need repair, renovation or renewal every few years, particularly following frost damage or heat-waves. (paving surface cleaning information)