"every path" style affects \node "path" when decorating

This problem has been solved some time ago by Jake, I think, in this stellar answer. It is sort of the opposite of what you suggest: if you use \path (<coordinates>) node..., it works.

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}[every path/.style={decorate,decoration=random steps}]
  \draw (0,0) -- (10,0);
  \path (5,-2) node[decorate,draw, fill=yellow, inner sep=0.5cm]  {};
\end{tikzpicture}
\end{document}

enter image description here

EDIT: The picture looks a bit as if the left edge of the node was straight. However, that's just an accident, as can be seen from the following animation in which the random seed varies.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\foreach \X in {1,...,50}
{\begin{tikzpicture}[every path/.style={decorate,decoration=random steps}]
  \pgfmathsetseed{\X}   
  \draw (0,0) -- (10,0);
  \path (5,-2) node[decorate,draw, fill=yellow, inner sep=0.5cm]  {};
\end{tikzpicture}}
\end{document}

enter image description here

EDIT: And if you don't want to write draw,decorate over and over, you could just append this to the node styles.

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}[every path/.style={decorate,decoration=random steps},
every node/.append style={draw,decorate}]
  \draw (0,0) -- (10,0);
  \path (5,-2) node[fill=yellow, inner sep=0.5cm]  {};
\end{tikzpicture}
\end{document}

apparently every path doesn't work as you expected. you still need to explicit say, which lines, shapes has decorate path:

\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}

\begin{document}
\begin{tikzpicture}[every path/.style={decoration=random steps}]
  \draw[decorate] (0,0) -- (10,0);
  \node[decorate, draw, fill=yellow, inner sep=0.5cm] at (5,-2) {};
\end{tikzpicture}
\end{document}

so, it maybe more handy (for shorter writing) to define path style for example as

DP/.style={%decorated path
           decorate, decoration=random steps}

and than use as follows:

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{decorations.pathmorphing}

\begin{document}
\begin{tikzpicture}[DP/.style={%decorated path
                                decorate, decoration=random steps}]
  \draw[DP] (0,0) -- (10,0);
  \node[DP, draw, fill=yellow, inner sep=0.5cm] at (5,-2) {};
\end{tikzpicture}
\end{document}

enter image description here