Q. Supplicating to the Imams (as) cannot be wrong because we have seen many people who supplicate to the Imams (as) and their wishes are fulfilled. If supplicating to them is wrong then how come their wishes are fulfilled?
If this argument was correct then supplicating to Jesus, Ram, Hanuman, Ganesh, Tree, Rat, Snake etc would also be correct, since those who supplicate to all the above have their wishes fulfilled too. Therefore mere fulfillment of wishes does not prove the correctness of the way of supplication.
This can be demonstrated from a simple example, a person who works to earn money also gets money, and a person who steals also gets money, but the first way is correct and the second one is not.
Allah (swt) gives sustenance to everyone irrespective of their way of supplicating, but He (swt) has told us the correct and incorrect ways in the Quran, therefore we will be judged on that basis.