This is my foo.sty package:
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{foo}
\usepackage{pgfopts}
\pgfkeys{
/foo/.cd,
anonymous/.store in=\fooanon,
}
\ProcessPgfOptions{/foo}
\endinput
This is the document:
\documentclass[anonymous]{acmart}
\usepackage{./foo}
\begin{document}
\ifdefined\fooanon YES \else NO \fi
\end{document}
It prints YES, while I didn't provide the anonymous option to my package. Somehow it took it from the list of options I provided to the acmart class. Why and how to get rid of this "side effect"?