The LEFT OUTER JOIN is used to guarantee that every row in the table to the left of the join will be displayed even if a successful join to the table on the right doesn't exist. [RIGHT OUTER JOIN works in the opposite direction]
The ON portion of the query chooses how to join the two tables. If you use the ON like I did it will show all rows in Mapel regardless if there is a nilai record to mach. Further more it will also show all rows in Mapel regardless if there is a id_siswa match.
When you used the WHERE clause to filter the id_siswa it applied that filter to the entire result set instead of just limiting the join.
The general order of operations for a SQL query is as follows:
-Each JOIN is executed in the order it is declared.
-Each ON clause is executed as each JOIN resolves to filter the join
-The WHERE clause then is executed filtering the table data resulting from all the joins
-The GROUP BY statement is then applied grouping the filtered result set
-Next the "HAVING" is applied to the Grouped result set
-Next the SELECT fields are processed from left to right.
-Last the ORDER BY statement resolves.