The Magnuson-Moss Warranty Act which is enforced by the Federal Trade Commission makes it illegal for a company to make a warranty void if the vehicle was serviced by another person or company. That boils down to them saying that the owner can do his/her own service.
They must keep records of the supplies and use fluids/parts that are correct for the servicing.
The company/dealer can void the warranty if there is any damage done during the servicing though so, for instance, if the oil drain plug was cross-threaded or stripped out, that could void the warranty that would cover the damaged parts.
Of course, this law applies to the people in the U.S.A. only. The people in other countries need to check on their laws about this before they can assume their safe.