It helps to think of the archivist as a divine wizard
That’s what he is, with a “prayerbook” instead of a “spellbook” but they work the same way.
Here, I’ll go through the two of them side-by-side to show you. Note that in all cases, when I say “wizard,” I am ignoring the Specialist option for wizards; the wizard in each example is a “generalist.”
Spells per day
A wizard may prepare a number of spells of each level as listed in their Spells per Day table, as well as additional spells for having a high Intelligence score.
An archivist works the same way, except the bonus spells are for having a high Wisdom score rather than Intelligence score. This change is important because everything else an archivist does is based on Intelligence; this split between Intelligence and Wisdom is known as dual-ability dependence, and is a pretty big deal (for example, a wizard could have a very low Wisdom score, relying on his strong Will save to counteract that, but an archivist needs Wisdom for the bonus spells).
Bonus spells are a mechanic common to all spellcasters; the only thing that changes is the ability score used. In all cases, these are only spell slots, not spells known. The amount of bonus spells is given in Table – Ability Modifiers and Bonus Spells.
Spells “known”
Neither archivist nor wizard knows spells the way a sorcerer does; they require an external aid, namely the prayerbook or spellbook. These books may contain many, many spells, but the archivist or wizard must prepare his spells per day (as determined above) ahead of time, so they only have access to a limited subset of the spells they “know” (that is, have in their prayerbook or spellbook).
Neither the archivist nor the wizard has a table indicating their spells known, because they may add as many spells as they can find/afford/fit into their prayerbooks/spellbooks. The table you see is for Spells per Day only.
Both archivist and wizard require that their Intelligence score (not bonus) be at least 10 + the spell’s level to add it to their prayerbook/spellbook, and they must be a high enough level to cast it in order to prepare it.
Other divine spellcasters, like cleric or druid, also must prepare their spells ahead of time, but need no book, since their spells come from their deity or divine forces. In a sense, the gods or powers that such spellcasters pray to form a gigantic “spellbook” for these classes.
Initial spell/prayerbook
A wizard starts play with a spellbook that has every cantrip from the Sor/Wiz list in it, as well as three 1st-level Sor/Wiz spells, plus an additional 1st-level Sor/Wiz spell per Intelligence bonus.
An archivist starts play with a prayerbook that has every orison from the Cleric list in it, as well as three 1st-level Cleric spells, plus an additional 1st-level Cleric spell per Intelligence bonus.
Free spells on level-up
A wizard gets to add two Sor/Wiz spells of up to the highest level he can cast to his spellbook every level.
An archivist gets to add two Cleric spells of up to the highest level he can cast to his prayerbook every level.
Additional spells
Here’s the tricky bit. Both archivists and wizards can add more spells to their prayerbook/spellbook. This costs money, but ultimately not that much money. They have to find the spells to copy them into their books, but this also means they can take advantage of a lot of spells they come across.
Wizards are fairly straight-forward. The spell must come from the Sor/Wiz list, and it must be copied from an arcane scroll or spellbook. For examples, a wizard could copy into his spellbook a scroll of protection from evil that was written by a sorcerer (i.e. arcane scroll, spell is on Sor/Wiz list), but not a scroll of protection from evil that was written by a cleric (on Sor/Wiz list, but not arcane), nor a scroll of cure light wounds written by a bard (arcane, but not on Sor/Wiz list).
Archivists are similar, with one major difference. Where a wizard must copy an arcane scroll or spellbook, an archivist must copy a divine scroll or prayerbook. However, where a wizard can only copy spells that are on the Sor/Wiz list, the archivist doesn’t care what spell list it is on. As long as the scroll or prayerbook is divine, the archivist may copy it, prepare it, and cast it (assuming they can cast spells of that level).
Balance and design
You seem to be a bit confused why things are the way they are, and you questioned the balance of things at least once, so I want to explain what’s going on.
To begin, the archivist is a phenomenally powerful class. It is one of the top five most powerful classes in the game, in fact. The wizard is as well, which is hopefully not surprising at this point since the two are nearly identical. The others are the artificer (Eberron Campaign Setting), cleric, and druid.
I’m going to ignore the oddball (the artificer); for the other four, all are considered to be in the top “tier” because they get extremely powerful spellcasting (up to 9th-level spells, the best there are, and from very good spell lists), and they can change which spells they have every day. That flexibility is fundamentally incredible, and it is that fact alone that separates these spellcasters from the next tier, which includes for example the sorcerer (literally the same list as the wizard, but can’t change spells so easily).
So yes, these classes are incredibly powerful. You’ll notice that three are from the original Player’s Handbook – Wizards simply underestimated what they could do, overestimated what other classes could do, and made mistakes making them.
The archivist was written much later, but was based on the cleric and wizard, so it inherited their power. Since the cleric could already access the entire Cleric spell list, the archivist needed something extra to justify the prayerbook: that extra something was the ability to scribe any divine spells, not just Cleric spells. The archivist also gets pretty nice class features, so it splits between Int/Wis instead of being pure Int or pure Wis. That’s how it got to be the way it is.
Best Answer
You really want to start with 18 Int, and by 5th level you should probably have a headband of intellect +2, for a total of 20 Int. Won’t help your 3rd-level spells, but it will give you another 1st-level spell and it will also help your save DCs; any spell that someone fails a save to that they otherwise would have made, is a spell you don’t have to cast again.
Smart use of your spell slots also goes a very long way. If you hit some dudes with a fireball, they take some damage. They probably aren’t dead, though, and you’ll probably end up having to hit them with another fireball. And in the meantime, they are just as dangerous to your allies as they were before, and your allies are no more effective than they were.
If, instead, you haste your allies, you double the damage the fighter or barbarian and cleric or druid do, you give a dual-wielding rogue another attack (and, hopefully, that means another Sneak Attack), and so on. This will add up to a lot more damage than a fireball, you don’t have to worry about aiming, and if the first set of hasted attacks isn’t sufficient to kill them all, your allies remain hasted for several rounds without you having to cast another spell.
Alternatively, grease and glitterdust are some phenomenally effective debuffs: grease can have enemies flat on their back, or refusing to move for fear of falling, and really lets a rogue go to town, while glitterdust blinds which, for most things at low level, means they’re basically incapable of performing as any kind of threat. Best of all, these are a 1st-level and 2nd-level spell, respectively: you can save your higher-level spell slots for fly, perhaps, for scouting or just keeping yourself out of danger.
Ultimately, these are how a wizard is powerful, not through direct-damage. Most direct-damage spells are weak. Consequently, Evocation as a school is fairly weak (and its best spells, contingency and resilient sphere, are some of the few evocations that don’t deal damage). Specialization is a very good idea, but often because it’s no big loss to ban Evocation (and Enchantment); see here for all about specializing and the best ways to do it. You’ll notice that the four spells I recommend are all Conjuration (grease and glitterdust) or Transmutation (haste and fly); that’s not a coincidence. Specializing in these very diverse schools is an excellent way to extend your day, both by giving you another spell, and also by simply having each spell count for more.
Finally, it’s worth noting that pretty soon, your basic spells per day, specialized or not, are going to get pretty large. Pretty soon, if you spend your spell slots wisely, it will be a rare day when you are actually risking running out. For now, it’s a real concern, but you can get by. If you want, though, pearls of power are the way to expand your spells per day.