ICMP Redirect on Cisco IOS

Hello Rene,
I have a question and I am going to use the below diagram as a reference for my question.

image

From this switch when I was trying to reach 10.10.20.20, I was not able to reach it. However, other IP addresses from the same subnet such as 10.10.20.1 or 10.10.20.50 is reachable from the switch.
After doing some research, I found this:

Switch#show ip redirects
Default gateway is 192.168.115.10

Host                      Gateway           Last Use    Total Uses       Interface
10.10.20.20         192.168.115.1         0:00        4912               Vlan20

Clearing the redirect cache resolved the issue and now 10.10.20.20 is reachable from the switch.

Switch#clear ip redirect
Switch#show ip redirects
Default gateway is 192.168.115.10

Host               Gateway           Last Use    Total Uses  Interface
ICMP redirect cache is empty

Would you please explain why?

Thanks in advance.

Best Regards,
Azm Uddin