Plastic behind baseboards

I bought an older house. It has hardwood floors, and various combinations of lath/plaster, drywall, and fake wood panel stuff. At the base of the walls is the baseboards, which I removed to paint and/or replace. Behind these wood baseboards along the entire length is a piece of plastic. Thin sheet stuff.

Has anyone seen plastic behind baseboards before? Is this plastic for some function? Do I need it, or should I remove it?

Plastic behind baseboards

The plastic was put under and up the walls when they laid the hardwood floor as a moisture barrier in case of water leaks in other rooms or of high moisture concrete.. Leave it and just install the new baseboard over the top of it.