The <Chapter> rule is not really that special as all armies have an equivalent now, whether it be <Sept> for Tau or <Regiment> for Imperial Guard. In a nutshell, every Marine unit needs to be assigned a specific Chapter (one of the pre-existing ones from the extensive 40k background material or a “homebrew” Chapter) during list-writing. Some units already have a Chapter assigned (notably, the special Characters such as Marneus Calgar). The main effect of the <Chapter> rule is that the majority of special “aura” abilities such as the Captain’s “Rites of Battle” or the Chaplain’s “Litanies of Hate” are only conferred to models sharing the same <Chapter> keyword. This will usually dictate that you avoid mixing different Chapters in the same army as doing so means you are getting less bang for your buck out of each Character in your list. That said, there are times when this is not going to be the best course of action. For example, if your army features a distinct forward assault element (Vanguard Vets, Scouts, etc.) and a backfield firesupport element (Dreadnoughts & Devastators), you may gain more from splitting your army into different Detachments (because mixing Chapters in the same Detachment will mean you lose both the “Defenders of Humanity” and “Chapter Tactics” special rules) since the aura abilities of the army’s Characters are unlikely to be in range of both elements anyways. In the above-described army, you would gain more from making your assault Detachment into Black Templars (for those sweet charge range rerolls) and your backfield element into Raven Guard (to make the Dreads and Devs harder to neutralise by enemy long range firepower) than keeping everything in the same Detachment with the same Chapter Tactic. Sometimes, you can fudge this a bit thanks to some of the special Characters – Shrike has a “reroll charge range for jump infantry” ability, meaning that the advantage of splitting the army into different Detachments is mitigated somewhat in this instance: your Vanguard Vets would gain both the awesome charge length reroll ability AND would have the increased durability against ranged damage conferred by Raven Guard Chapter Tactic.
The Lost Librarius is a special rule exclusive to the Black Templars, stipulating that they may not select Psykers. This is really only a minor inconvenience as a) Librarians can cast their powers on any model with the ADEPTUS ASTARTES keyword anyways (and not just those sharing the same <Chapter> keyword, like most other special Character abilities) and b) Black Templars can already reroll their charge range, making Veil of Time – probably the best power in the Librarius discipline – partially redundant. Having a Librarian of a different Chapter opens up the opportunity to have 2 different Detachments with distinct functions, as described above. Indeed, going back to our aforementioned example, the Librarian could serve as our Raven Guard’s mandatory HQ for a Vanguard Detachment (to add some Autocannon Dreadnoughts to our force). Give him the RG Relic Jump Pack and he can keep pace with the Black Templar Vanguard Veterans! Worst case scenario, you could always expend a Command Point to add a Librarian to your force via an Auxiliary Support Detachment.