Tesla Motors is churning through the news cycle again—this week, it reported its quarterly results and plans to massively ramp up production to meet the huge demand for the next-generation Model 3. Even as the company loses money, it continues to invest in order to build production capacity and gain scale. And its stock, despite some volatility, remains buoyant.

Part of that has to do with the faith investors have in the financial engineering skills of founder Elon Musk, who owns 27 percent of the company. As the Wall Street Journal reported last week, Musk has used his personal funds, borrowing capacity, and control of companies to bolster the finances of Tesla and SolarCity, the solar-power company run by his cousins in which he owns a 22 percent stake.

Skeptics of Musk’s various enterprises—the Muskonomy, I call it—often overlook the degree to which Musk is a financial host unto himself. What’s more, it’s becoming clear that the companies he effectively controls—Tesla, SolarCity, and SpaceX—function in some ways like a Japanese keiretsu, a group of allied companies with interlocking business relationships. Such arrangements are rarely seen in the U.S. While Musk is the connective tissue, these firms support one another at the corporate level in crucial ways.

Let’s count them.

For manufacturing businesses such as SolarCity and Tesla, scale is vital. Ramping up the volume of production gives you better bargaining power on supplies and labor, lowers unit costs, and enables the spread of technology. Scale allows you to make the most of your expensive investments in capital. If you’ve built a big factory, you need to run three shifts around the clock, not just eight hours a day.

In order to get scale, SolarCity needs lots of cash upfront. The company spends a lot to build, market, and install the solar-panel systems it leases to homeowners and businesses, and it has to wait to collect the lease payments over time. Over the years, it has raised funds from banks, institutional investors, and other entities that have money sitting around that can be tied up for a year or so—including … SpaceX.

SpaceX has a great business model. It gets its customers—including the U.S. government—to make upfront payments to finance and reserve space on upcoming satellite launches. As a result, SpaceX often has cash—tens or even hundreds of millions of dollars—sitting on its balance sheet that it might not need for a year or two. Most companies put this cash to work in ultrasafe short-term investments, such as government bonds and cash. But last year, SpaceX used $165 million to buy bonds issued by SolarCity that are backed by solar leases. The move is an unorthodox one for a company: The bonds aren’t really traded, and SpaceX bought instruments that don’t pay off for a year. On the other hand, SolarCity bonds pay way, way more than government bonds—4.4 percent interest for a one-year investment. This spring, SpaceX bought another $90 million in SolarCity bonds, which allowed SolarCity to pay off the $90 million in bonds SpaceX had purchased in 2015. Both parties benefit: SolarCity gets capital on relatively favorable terms, and the space company gets comparatively, um, astronomical returns.

Next, consider the symbiosis between SolarCity and Tesla. As solar grows and matures, it raises an issue for users and utility systems: Solar panels produce a lot of electricity during the day, when demand typically isn’t that high for residential use, and then produce little or nothing in the late afternoon or evening, when residential demand rises. This mismatch is a barrier to expansion. Increasingly, solar companies are finding that pairing solar generation with electricity storage is a great solution: You charge up the batteries during the day with excess power generated by the sun and discharge them at night.

SolarCity is embracing the solar-plus-storage model at both the wholesale and retail level. It struck a potentially revolutionary deal with the Kauai Island Utility Cooperative in Hawaii, under which it will build a huge solar field on 50 acres. But instead of feeding the power into the grid instantly, it will use the panels to charge up a giant battery array with 52 megawatt-hours of capacity. And every day, between 5 and 10 p.m., those batteries will function as a power plant, injecting clean energy into the grid—all for less than the utility would pay for electricity generated by burning fossil fuels. On the retail level, SolarCity has rolled out a similar product for home users in Hawaii and elsewhere: Pair the company’s solar panels with a battery pack, which can be charged during the day and tapped at night.

Now, SolarCity could buy the battery packs from a range of suppliers. But it has chosen to buy them from … Tesla.

SolarCity is likely getting a pretty good price on the batteries, and it’ll be easy for SolarCity’s executives to hold their counterparts at Tesla accountable for delivering quality products. But this arrangement is also a boon to Tesla.

Tesla craves scale in the same way that SolarCity does. Remember, Tesla makes the battery packs that power its vehicles and is constructing a giant factory in Nevada, the Gigafactory, to build more of them. It is pursuing a path of vertical integration. As its car production ramps up by a factor of five, Tesla needs to ensure it has an adequate supply and wants to capture the profits that might have accrued to a supplier. What’s more, anything that increases the volume of orders of batteries—whether those orders are from Tesla itself or SolarCity—helps bring down the unit cost. So SolarCity, which raises funds from SpaceX, is providing a vital stream of revenues outside the auto industry for Tesla and is helping to increase volume.

In theory, that should help lower the cost of producing Teslas, thus boosting sales. And, ultimately, higher sales of Teslas can lead to more potential demand for … SolarCity. Tesla—and electric cars generally—offer drivers the ability to break the link between mobility and combustion. But Tesla owners who also have rooftop solar panels and battery storage can break the link between electricity production and emissions. Many of the hundreds of thousands of people who think it is cool to buy Tesla vehicles may also think it will be cool to “fuel” their cars with solar-plus-storage systems sold by SolarCity.

So what’s not to like? Clearly, these arrangements between related companies can be symbiotic and synergistic. But they also pose potential conflicts. In the U.S. system, shareholders are supposed to be the master. And it’s not always clear which shareholders are getting the better deal in these intra-Muskonomy transactions. What if there’s high demand for battery packs, and other solar companies are willing to pay more than SolarCity for the output of the Gigafactory? It would make more sense financially for Tesla to serve those other customers first. But doing so would like cause problems for SolarCity.

In addition, these types of interconnections can help spread problems at one company into another. If Tesla were to have a serious problem with battery production, that could lead to dire consequences for SolarCity, which would in turn have difficultly making the payments on the bonds that SpaceX holds. So far these arrangements are working really well. They always do—until they don’t.