summary: motorbikes have heavier wheels, making them smaller makes them more maneuverable. motorbikes go faster, so air resistance is more important and bigger wheels have more of it. motorbikes have much more power available, and go faster, so suspension is both easier to carry and more necessary.
there are more considerations than just bumps, though. yes, bigger wheels handle bumps better than small ones. if you only care about that the wheel size will be limited only by the wheels you can buy – this is why the 36″/iso787 wheel size is popular in some quarters. you can get bigger wheels, but tyres become very hard to find and will likely have to make tyres, tubes and rims yourself.
bigger wheels are weaker for the same weight, and weight matters a lot for a bicycle. effectively you’re spreading the same amount of material out over a bigger rim and tyres, so everything gets thinner. at the same time, since bicycles at least have a fairly restricted hub width, the wheel gets weaker laterally because the angle between left and right spokes gets smaller at the same time as the lever arm gets bigger.
bigger wheels have more air resistance because they have more frontal area. sure, you can work on that, but anything you can do to reduce the air resistance of a bit wheel you can also do to a small wheel… and if you look at the battle mountain bikes, they use the same techniques as the uci bikes on their small wheels.
Read more: Never use “tire shine”
for example, the bicycle world speed record set by a moulton small-wheel bike:
in 1986 jim glover rode this bicycle at 51mph on a flying 200 metre course to set a world speed record that stands to this day.
so why do bicycles have bigger wheels?
as you said, bigger wheels handle bumps better. this is especially true when there’s little or no suspension (road bikes), but also applies to mountain bikes. a bigger wheel doesn’t drop into dips as far, so you lose less energy to the suspension.
motorbikes go faster than bicycles, and have higher top speeds. a whole lot of things follow from that.
Read more: Tips for Budgeting for a Motorcycle Purchase
that means motorbikes must have suspension, where it’s optional for bicycles. if a motorbike hits a bump and gets airborne, that’s exciting and unusual. but even a lot of bicycle riders are unaware that their bike wheels come off the ground, because that’s just part of riding your bike (you “unweight the saddle” the bike on bumps and use your body as part of the suspension). but as soon as you have suspension, the bump advantage of bigger wheels largely goes away.
the flip side of “bigger wheels are weaker” is that motorbikes put a lot more stress on wheels. they’re heavier, more power, and go faster. they also travel longer distances – a 1000km bicycle ride is a long way and takes days, but on a motorbike it’s not remarkable unless there are exceptional factors. lots and lots of motorbike riders travel more than, say, 50,000km a year by motorbike but hardly any bicycle riders do the same. so a motorbike has to last longer than a bicycle which makes strength more important. failures are also more dangerous at higher speeds, and with a heavier motorbike that can fall on the rider in a crash. again, stronger is important and small wheels are stronger.
bigger tyres have more rubber, so they last longer. bicycle tyres have to be thin so they flex, which means the motorbike solution of making tyres thicker to get longer life really doesn’t work. that makes a bigger wheel one of the few options.