I'm not entirely sure if the idiom should be "bubble gum and shoe strings" or "bubble gum and matchsticks"; however from the context it looks like it refers to a cheaply done repair job, which may be related to "a shoe string budget".
There are different versions such as “string and chewing-gum ” or “bubblegum and shoelaces”. The origin is probably just from common sense knowledge of two items that suggest a precarious and unreliable solution.
There’s an old saying about something being held together by just string (or shoestrings) and chewing gum. The idea, of course, is it is not a reliable (or solid) state of affairs. As things go, yours truly often has the notion that life is being held together with string and chewing gum.
An early usage example is from 1924 as suggested by user Gregor Y:
Fom The Northeastern Reporter, Volume 140
In this precinct, for want of a wire on which to string the ballots, they stacked them in piles after they were counted, and tied them, thus piled, with strings two ways and sealed the strings with chewing gum where the knots crossed, and then put ...
Some people suspect that the American economic system has been put together with string and chewing gum and that its greatest characteristic is its lack of system .
I’ve always heard it to be ‘shoe strings and sealing wax.’ It probably changes through time as different items become more common. Who used sealing wax anymore. On an aside I’ve always wondered if that was what Louis carrol was referring to when he mentions shoes and sealing wax in the walrus and the carpenter.