Both prepositions are correct but have slightly different meanings here, depending on how the author considers the bus. The interpretation also depends on context1.
"On the bus" considers the bus functionally as a form of transport.
"In the bus" emphasises that the bus is a place.
So if I read that someone "fell asleep in the bus", my first impression is that the bus is not in use (maybe it is abandoned somewhere, or maybe the character in the novel broke into the bus company's parking lot and got on a bus at night).
If I read instead that someone "fell asleep on that bus", I imagine it to be a bus that is in use as transportation, so the character caught the bus and fell asleep while it travelled to its destination.
(so far as I can think, this use of on is limited to forms of transportation. One can be on a bus, on a ship or on a plane, while actually being inside. As others have pointed out, if you said you were "on that house" you would be standing on the roof.
- It is possible to be on a bus that is not in service and vice versa, but that is unusual and requires additional context.
TL;DR: "at school" and "in school" are basically the same. You won't get yourself into trouble by using them the same way. This is almost always true when the verb is "learn", except for one corner case that I'll discuss below.
The long answer is that "school" can have several different, but related, meanings, and sometimes it sounds better with one or the other preposition.
In the example sentences you gave, "school" is a metonym that refers to the act of attending classes at some institute of learning. So "things you'll never learn [at / in] school" are things you won't learn by attending classes at some institute of learning. Any time that's the intended meaning, it's correct to use either "at" or "in".
On the other hand, sometimes you say "at school" to mean the actual location where the learning takes place. In those cases you usually have to say "at school" and not "in school". If you literally mean that something is inside the school location, you'd usually say "in the school" or "in the school building".
The border between these two uses can be very fuzzy. For example:
"Where's Bob?"
"He's at school / He's in school."
If we say "He's at school", it implies Bob is at the school building (probably attending classes). If we say he's "in school", it means he's currently attending classes at an institute of learning. In the example I just gave, it doesn't matter, but then we have:
"What's Bob doing these days?"
"He's in school."
While not wrong, it sounds a bit odd to reply that he's "at school" in this example.
One more example, specific to "learn":
"He learned French in school" means he learned French from attending classes at an institute of learning.
"He learned French at school" can mean the same.
But:
"He learned those bad habits at school" means the location where he learned bad habits was the school. Here "school" is the physical meaning. If we say "He learned those bad habits in school", then "school" is metonymy; it means that he learned bad habits from the process of attending classes. It strongly implies that the classes taught him the bad habits, whereas "He learned those bad habits at school" doesn't. The simplest way to understand this distinction is probably: If a professor taught him bad habits, he learned them "in school". If other kids or the janitor or random people who walked onto the campus taught him bad habits, he learned them "at school". If a professor taught him French, he learned it "in school" or "at school". If his French girlfriend taught him French, he learned it "at school". This is the only case I can think of where it makes a difference whether you learned it "in school" or "at school".
Best Answer
"It depends whether you want to participate or not." is a very imperfect sentence. First, "whether" implies "or not" which makes the latter redundant and superfluous. In addition, and in formal communication, "on" is required, and "if" is better that "whether."
Considering "Choosing the right bike depends what you want to use it for," the "it for" is colloquial\slang\poor grammar. I would say,
"Choosing the right bike depends on how it will be used."
The preposition is necessary to juxtapose or pre-position the two ideas on either side of it, choosing and using.Notwithstanding, language is fluid and mostly only what matters is the communication of ideas from author to audience.