For example:

emacs -Q

M-: (set-frame-parameter nil 'buffer-predicate #'(lambda (b) (message "f-b-p: %s" b))) RET
M-: (with-temp-buffer nil) RET
C-x b *Messages* RET

See that all buffers listed except of the *temp*(no window buffers were changed). Why?
This is inefficient, especially for the with-temp-buffer which is used very frequently in emacs and in side packages.