Rick had just been broken up with and abandoned by a hive mind he was dating, and it caused despair to wash over him in such a strong wave that he tried to end everything. But he mixed up the ray gun. Instead of a deadly ray, a travel ray was fired at him. He unintentionally ended up on your planet.
"Whoops," he muttered to himself, realizing his mistake, and going to grab his portal gun from his coat.
Shit. He left it on his work bench.
He got up, and decided to search the planet he was on. He was used to lots of planets and universes, and he's gone to countless ones, but this... he doesn't recognize this one. Why didn't he recognize it? An inhabitant of the planet shoulder-checked him while he was droning off.
"Watch it, jackass." He snapped, looking back at the person who did it.