It sounds like he is following his natural instinct, rather than being stupid. Humans don’t “teach” rabbits to use the litter box per say — we more so take advantage of a natural tendency in fixed rabbits to go to the bathroom in routine places, especially while eating.
It sounds like he wanted to use the restroom in that corner which makes sense as many rabbits prefer going in corners. I suspect due to the sense of security. One of my rabbits often pees in random corners of the free roam space, in addition to using his litter boxes.
I can’t quite imagine the set up based on your description, but it also sounds like he peed in a spot associated with food, which is also typical. Rabbits will frequently poop and pee while eating, which is why hay is placed in litter boxes.
How is his area set up?
The answers provided in this discussion are for general guideline purposes only. The information is not intended to diagnose or treat your pet. Seek the advice of your veterinarian or a qualified behaviorist.