Is styrofoam good for attic insulation?
That styrofoam insulation will work, but it is not cheap per R-value (however it gives you a great R-value per inch).  Insulating an attic usually means you have a lot of room for insulation and you will need high R-value so that is why the cheaper options are more popular (blown cellulose or blown fiberglass).

Said another way, if you have a couple of feet of space in your attic, you can just fill that all up with loose insulation and get R-45 (or whatever you need).  But if you have a smaller space, say it is a finished room and the only space for insulation is between the 2x6 or 2x8s ceiling joists you may want to pay extra to get a higher R-value in that limited space.