Variáveis e funções residem em diferentes namespaces em dash e isso também é especificado por POSIX :
The implementation shall maintain separate name spaces for functions and variables.
Além disso, as variáveis têm escopo global, por padrão. Algumas shells (por exemplo, bash, ksh e zsh) fornecem a palavra-chave local
para declarar variáveis em uma função apenas com escopo local.
Então, sim, o comportamento que você está vendo é garantido pelo POSIX.
POSIX não tem padronizado local
, ainda :
The description of functions in an early proposal was based on the notion that functions should behave like miniature shell scripts; that is, except for sharing variables, most elements of an execution environment should behave as if they were a new execution environment, [..]
[..] Local variables within a function were considered and included in another early proposal (controlled by the special built-in local
), but were removed because they do not fit the simple model developed for functions and because there was some opposition to adding yet another new special built-in that was not part of historical practice. Implementations should reserve the identifier local
(as well as typeset
, as used in the KornShell) in case this local variable mechanism is adopted in a future version of this standard.
(ênfase minha)