(EDIT: substantially revised because I hadn't thought carefully enough about Rosie F's labeling. The result is even cooler!)
Thanks for all the great answers. I would like to add my own solution.
It's key to label squares in the torus, as Rosie F and Brilliand did:
4,2 0,3 1,4 2,0 3,1
1,0 2,1 3,2 4,3 0,4
3,3 4,4 0,0 1,1 2,2
0,1 1,2 2,3 3,4 4,0
2,4 3,0 4,1 0,2 1,3
But we can do more than just label the squares: we can view the labeling as a map (transformation) from the torus to itself!
Suppose we fix the centre cell 0,0 as an origin (and relabel 3 & 4 to -2 & -1 respectively). Let's track what happens to the straight lines under the labeling map. There are 6 straight lines each of 4 cells running through this origin. 6x4+1 = 25: check.
The lines come in 3 pairs:
- vertical & horizontal for rooks
- dexter & sinister for bishops (terminology from heraldry: maybe related to the line through which a right-handed swordsman would commonly sweep his sword?)
- left-turn & right-turn for knights (knight moves forward 2, then turns left or right)
Labelings are completely determined by two values: e.g. where to place 1,0 & 0,1, and we build up everything from there linearly. In particular, Rosie F started with:
1,0 -> -2,1
0,1 -> -2,-1
This maps both the rook lines to knight lines. Now adding/subtracting these gives:
1,1 -> 1,0
1,-1 -> 0,2
So we are mapping bishop lines to rook lines. And adding another dose of "rook":
2,1 -> -1,1
1,2 -> -1,-1
And hence we are also mapping knight lines to bishop lines.
Since R->N->B->R, we can view knights and bishops as just being rooks in other frames of reference. The number of ways to arrange 5 non-attacking rooks is obviously 5!, so the same must be true for 5 non-attacking knights - and also true for 5 non-attacking bishops!
There are 480 possible labelings (known to their close friends as GL(2,5)). Each gives a frame of reference from which to view the antics of chess pieces. From some, e.g. bishop lines are fixed, while knights and rooks are swapped (e.g. 1,0->-2,-1 & 0,1->1,-2). Others are much more alien, and pieces behave like chimerae (e.g. a combination of vertical rook and dexter bishop). It follows that even for these weird "half-man-half-biscuit" pieces, the number of ways that 5 can appear is exactly 120.
EDIT: generalize to larger boards
What happens if we generalize to different size boards? Let's say we have a pxp toroidal board, where p is an odd prime (in order to avoid division issues). Then through any point Z there are p+1 lines (with gradients 0,1,...,p-1 and infinity. Each line contains p points, including Z. Check: (p-1)(p+1) + 1 = p^2 ok
Any non-singular 2x2 matrix will map the points A (1,0) & B (0,1) to any two points C, D which are not collinear with O (0,0). But this defines a mapping from the lines including OA & OB to the lines including OC & OD, if we ignore the precise points mapped to.
Doing some counting, there are (p^-1)(p^-2p) non-singular matrices and any pair of lines through the origin are mapped to any other pair of lines by (p-1)^2 matrices. There are thus (p-1)p line-to-line mappings, which is what you would expect.
In larger boards, knights will not have a role, as they are "local" in action and can only access 8 squares. But nightriders are relevant to consider. Their lines are not as symmetric as rooks or bishops: a nightrider accesses twice as many lines, or twice as many squares. We would have to compare the left-nightrider and the right-nightrider with rook and bishop to have pieces of equivalent power.
If p=7, then there are 8 lines through any point: rook, bishop and nightrider cover them all. If p=11, then we get 4 more lines due to a unit we can call camelrider. (If a knight's move is (2,1) then a camel's is (3,1).)