There are two different types of bacteria in your aquarium, heterotrophic and autotrophic with the latter being the beneficial bacteria(the nitrogen cycle). The bacterial bloom is a condition in which a sudden increase in the number of heterotrophic bacterial colonies occurs, specifically bacteria that are suspended in the water column. The bacteria grows so quickly that collectively they become visible to the naked eye, causing the water to become the cloudy. This condition most often is seen in a newly started aquarium, but can also occur in a tank in which there is has been a sudden increase in the nutrients in the water(ie more fish waste). The heterotrophic bacteria dies which is the root cause of the ammonia spike. The current autotrophic bacteria is too slow and unable to convert the excess ammonia which leads to toxic levels, killing fish.
Water changes can introduce new organic matter from tap water, while immature tanks lack sufficient beneficial bacteria to process it, leading to blooms which again causes an ammonia spike.
You have a 40 breeder which I’m guessing isn’t filled all the way to accommodate the turtle so adding new fish and or other increase amounts of nutrients explains the rapid bloom, bacteria die off, and ultimately the ammonia spike. Super long story made short, the tank is overstocked.