It was allowed precisely becouse of ethnic instability. As Austrian (later Austro-Hungarian) Empire declined they were forced to give more and more concesion to ethnic minorities or risk being torn apart from the inside. After austro-prussian war of 1866 poles siezed their chance and offered kaiser a deal. It started with words "beside your majesty we stand and wish to stand". In this deal they offered to support Austria in exchange for far reaching autonomy and autonomy was granted. Since 1870's they controled education, vote counting, police, government etc. in their part of the empire. Even chosen by kaiser overseer had to be polish. Even in WWI they had their own units with litte of austrian suppervision (which came to bite austrians in the ass). Battle of Grunwald monument wasn't the first, they build loss of monument before (for example mount of kosciuszko) and had yearly celebrations of many holidays from independence days. Polish poets, writers and painters could even make anti austrian/german/russian works there. And what did austrians get in return? They got ally in parliment, peace on the northern border and grand parades of citizen each time kaiser came to visit. TLDR: They had to agree to this or they would loose last "ally" in the empire