I mean in general it could be a right-ish idea. I myself have noticed when buying solar panels after replacing shingles that basically the per sqm cost of solar panels is like 2x of shingles (of the not super expensive kind). It could be easily more economical to use a modern version of this to replace your roof.
On the other hand, Tesla's solar shingles are tiny compared to panels, more in the shape of actual shingle strips, means tons of connectors, wiring losses, dangerous shorts (these things carry 10s of amps) etc. and probably a nightmare to troubleshoot.
I would not get these for any reason other than aesthetics.