I work on a CubeSat team and there are a few reasons why CubeSat teams choose aluminum.

1) CubeSat spec rules. The rules guiding CubeSats technically only allow aluminum. "3.2.15 Aluminum 7075, 6061, 5005, and/or 5052 will be used for both the main CubeSat structure and the rails." You can get a waiver, but it makes more sense to just keep to the spec for practical reasons. The CubeSat spec doesn't matter as much to private companies I think, but it does matter if you are a non profit or student team trying to get a launch with NASA.

2) Ease of use. This is the biggest reason (besides the CubeSat spec) most teams use aluminum. Aluminum is just so easy to build with compared to say carbon fiber. You can easily bend and drill aluminum to make the shapes you want for cheap. Carbon fiber is just difficult to work with.

3) Temperature resistance. Carbon fiber doesn't handle extreme temps as well. Outer space is extremely cold and in some cases it can cause carbon fiber to weaken. Meanwhile, titanium is a horrible choice because of its high temperature resistance. NASA explicitly tells people to not use it because Titanium has such a high melting point it can survive re-entry to Earth and accidentally hurt someone or destroy property.

4) Air trapping. Sometimes air can get trapped in composites like Carbon Fiber. This can result in it trying to escape into space and damaging the CubeSat. It's a major risk factor and one of the big reasons to avoid carbon fiber unless it's made in a specific way to ensure that doesn't happen. Unfortunately, it is hard to find carbon fiber that meets those standards.

5) Cost. For a 1/32 thickness 12" x 12" sheet of carbon fiber, it is 35 dollars. Same sheet size / thickness for aluminum is 16 dollars. That is over half the price. However, CubeSats are small (10 cm x 10 cm x 10cm in some cases) so material cost isn't as big of a deal as you might think. The bigger concern is the added weight might increase your launch cost. However, in practice the weight savings are negligible at the smaller CubeSat sizes. I should also note that the aluminum is mostly for the frame / chassis and that doesn't consume that much material. NASA charges nothing for their student / non profit launches so weight doesn't matter there as long are you aren't over the limit. For private launches, they usually round off the weight anyhow. Sometimes to the nearest whole KG, other times to the first decimal place. Either way, you probably aren't too concerned about weight due to the limited material used. I know for ours using Carbon Fiber wouldn't actually save on launch costs due to the rounding. If we were near the border or were doing a bigger sized CubeSat, then sure it might save us, but there are other things we can do first to save weight before switching materials. I think if we were building a very big CubeSat then yeah we might become concerned over the weight costing us extra. However, weight isn't the biggest factor for us simply because of the other reasons. Even if we wanted to, we couldn't use Carbon Fiber due to the air trapping and temperature issues.

Overall, the benefits of a lighter weight material like carbon fiber just isn't worth the difficulties that come with working with it. As a result, the standard is to use aluminum because it's cheap, works well, and is easy to use.

Edit: I said a 1U sat was around the size of a Rubik's cube before. However, I underestimated how small Rubik's cubes are. A Rubik's cube is 5.6cm on each size vs 10cm for the 1U CubeSat.