Some make targets (e.g., PRODUCT-aosp_x86) and environment variables (e.g., mmm) change how Android.mk should be parsed. You don't want to re-generate out/build-aosp_arm.ninja when you switch between m and mmm.
build/core/ninja.mk specifies different filenames for such non-default build configs.